By default, the Ambient Data Framework always generates cookies for your Web site visitors. International legislation or company policy may prompt you to change that system default behavior. Regardless of whether you left the default behaviors unchanged or set it to false, you can always create a Claim Processor that overrides the system default on a per-visitor basis.
Procedure
- If you want the Ambient Data Framework to never generate cookies for your Web site visitors, open the Ambient Data Framework configuration file, cd_ambient_conf.xml, in a plain-text or XML editor.
- In the
CookieClaim element, set or change the DefaultValue attribute so that it has the value false. Now, by default, the Ambient Data Framework never generates cookies.
- You can also create a Claim Processor that can override the default on a per-visitor basis. If you intend to create such a Claim Processor, in the
CookieClaim element, set the Name attribute to the name of your Claim Processor. The Ambient Data Framework will then check this Claim Processor for each visitor and override the system default if necessary.
How you implement this Claim Processor is up to you. The Claim Processor might decide how to set cookie generation without asking the visitor (say, it may decide to generate cookies based on the visitor's IP address), or it might explicitly ask the visitor if he or she wants to allow cookies, showing a 'yes' as default (opt-out scenario) or a 'no' (opt-in scenario).
- When you have configured the
DefaultValue and/or Name attribute, save and close cd_ambient_conf.xml and restart your Web application.