Monday, May 21, 2007

Programming : Create Cookies Cross Domain

IIS setting - Create Cookies Cross Domain
It is impossible to create cookies cross domain because the reason of security. But you still can do some triky to let your web site create cookies cross domain.

To create cookies cross domain, you need to create 2 XML file. These are p3p.xml and policy.xml.

P3P is a W3C standard on how to specify privacy policies for a web site. The standard has both a human readable part to it, as well as a machine readable part.


Step by Step

Open your IIS and expand local computer -> expand Web Site -> Expand Default Web Site -> go to your virtual directory -> right click to properties -> go to Http Header Tab -> Custom Http Headers and click Add -> Key in Custom Header name ="(P3P) and Custom Header Value = "(policyref="Full URL for ur policy file location", CP="NON DSP COR CURa TIA")"

You can create cookies cross domain if you follow all the step. If you got any Question, please leave me a comment.

171 comments: