Skip to main content
Tweeted twitter.com/#!/StackTridion/status/527754424865677312
edited title
Link
Nickoli Roussakov
  • 18.4k
  • 4
  • 31
  • 62

How can my website webapp detect that a XPM preview session is active and the Session Footprint Set is overwriting ADF claims?

Source Link
Jan H
  • 8.8k
  • 1
  • 22
  • 42

How can my website webapp that a XPM preview session is active and the Session Footprint Set is overwriting ADF claims?

The Question

How can my website webapp detect that a XPM preview session is active and the Session Footprint Set is feature overwriting ADF claims?

A possible solution

When the Footprint Set feature overwrites claims set by the cartridge there is no API call available to see that this is actually happening. I have found that the XPM sets a TAFContext.1 cookie when in Footprint Set mode. I am wondering if this a good way to detect XPM is overwriting cookies, maybe there are better options.

Context

enter image description here

The reason why I want to know is because I need my cartridge to clean up claims after the Footprint Set is disabled (user selected the "No Footprint Set Applied"). XPM does not restore the overwritten claims but keeps the claims to the whatever value it was overridden to. This is fine for claims which are set on every request but claims which have a high cost (i.e. call to backend) typically are set only once.