简体   繁体   English

IE8为什么会阻止iframe中的cookie?

[英]Why is IE8 blocking cookies from within an iframe?

I inherited a site and I am trying to make it work in IE8. 我继承了一个网站,并试图使其在IE8中工作。 It works fine in every other browser. 它在所有其他浏览器中都可以正常工作。

I'm using the following P3P tag that I got from another post: 我正在使用从其他帖子中获得的以下P3P标签:

header( "P3P: CP=NON DSP LAW CUR ADM DEV TAI PSA PSD HIS OUR DEL IND UNI PUR COM NAV INT DEM CNT STA POL HEA PRE LOC IVD SAM IVA OTC");

If I inspect the headers, it is being sent, so why is IE8 still blocking cookies from within the iframe ? 如果我检查标头,则表明它正在发送,那么IE8为什么仍阻止iframe cookie?

I believe your code just needs the CP value to contain quotes. 我相信您的代码只需要CP值即可包含引号。 For simplicity, I used single quotes for the outer string and double quotes for the value passed back in the header. 为简单起见,我对外部字符串使用单引号,对在标头中传递回的值使用双引号。

header( 'P3P: CP="NON DSP LAW CUR ADM DEV TAI PSA PSD HIS OUR DEL IND UNI PUR COM NAV INT DEM CNT STA POL HEA PRE LOC IVD SAM IVA OTC"' );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM