Cookie blocked/not saved in IFRAME in Internet Explorer

前端 未结 22 2090
死守一世寂寞
死守一世寂寞 2020-11-22 00:53

I have two websites, let\'s say they\'re example.com and anotherexample.net. On anotherexample.net/page.html, I have an IFRAME S

22条回答
  •  再見小時候
    2020-11-22 01:14

    I was able to make the evil eye go away by simply adding this small header to the site in the IFrame (PHP solution):

    header('P3P: CP="NOI ADM DEV COM NAV OUR STP"');
    

    Remember to press ctrl+F5 to reload your site or Explorer may still show the evil eye, despite the fact that it's working fine. This is probably the main reason why I had so many problems getting it to work.

    No policy file was neccesary at all.

    Edit: I found a nice blog entry that explains the problem with cookies in IFrames. It also has a quick fix in C# code: Frames, ASPX Pages and Rejected Cookies

提交回复
热议问题