解决IE下Iframe的Session丢失

阅读更多
IE6/IE7支持的P3P(Platform for Privacy Preferences Project (P3P) specification)协议默认阻止第三方无隐私安全声明的cookie,Firefox目前还不支持P3P安全特性,firefox中自然也不存在此问题了。
Mircosoft对此的具体描述可以参见 Privacy in Internet Explorer 6解决办法是在要嵌入的内容中(iframe指向的站点)输出P3P的主机头声明:

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");

JSP:  
response.setHeader("P3P","CP=CAO PSA OUR IDC DSP COR ADM DEVi TAIi PSD IVAi IVDi CONi HIS IND CNT");

你可能感兴趣的:(IE,P3P,firefox)