P3P and Cross-domain (cross-domain) cookie access (read and set) _ Application Tips

Source: Internet
Author: User
For example, to visit station B to set up a cookie at station A, you can do this:

1. Establishment of a document under the B.Com cookies.htm
Content is:
Copy Code code as follows:

<script language= "javascript" src= "http://a.com/setcookies.asp?par=a.com" ></script>

The contents of the setcookies.asp under 2.a.com are:
Copy Code code as follows:

<%
Response.AddHeader "P3P", "Cp=cura ADMa DEVa Psao psdo our bus UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"
Response.Cookies ("AAA"). Domain = Request ("par")
Response.Cookies ("aaa") = "This is a cookie that is set under B.Com by accessing the file under A.com"
%>

By accessing the cookies.htm files under B.Com, you can set up and modify the cookies in the domain a.com, thereby enabling cross-domain access to cookies.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.