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.
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.