Cross-origin cookie

Source: Internet
Author: User

Introduction: This is a detailed page for Cross-Domain Cookie. It introduces the related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 334793 'rolling = 'no'>
I got a call today about one of my applications not running correctly from inside an IFRAME. I tried it out and it looked like everything worked great in Safari and Firefox but not IE6 or ie7. it took me a few failed attempts to fix it before I decided it must be a session problem. after firing up a packet sniffer it became obvious the cookie with the session ID was not being passed.

The problem lies with a W3C standard called platform for privacy preferences or p3p for short. you can read all about the boring stuff via the link or else just install the p3p Compact Policy header below. this will allow Internet Explorer to accept your third-party cookie. you will need to send the header on every page that sets a cookie.

PHP:

Header ('p3p: Cp = "idc dsp cor ADM Devi taII psa psd ivai ivdi coni his our ind CNT "');

ASP. NET:

 
Httpcontext. Current. response. addheader ("p3p", "cp = \" idc dsp cor ADM Devi taII psa psd ivai ivdi coni his our ind CNT \"");

DJANGO:

 
Response = render_to_response('mytemplate.html ') response ["p3p"] = 'cp = "idc dsp cor ADM Devi taII psa psd ivai ivdi coni his our ind CNT "'

JSP:

 
Response. addheader ("p3p", "cp = \" idc dsp cor ADM Devi taII psa psd ivai ivdi coni his our ind CNT \"")

More articles about "cross-origin cookie"

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/334793.html pageno: 10.

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.