当前位置: 代码迷 >> Web前端 >> iframe在ie6中的cookies读写有关问题
  详细解决方案

iframe在ie6中的cookies读写有关问题

热度:246   发布时间:2012-10-21 09:00:07.0
iframe在ie6中的cookies读写问题
在ie6的A页面中嵌入第三方页面B,则B页面中的cookies读写会失效,解决方法是在读写cookies之前声明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='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'")

ColdFusion:
<cfheader name="P3P" value="CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'" />

?

  相关解决方案