środa, 1 lutego 2012

Cookie blocked in IFRAME - Internet Explorer

A colleague of mine informed me today that one of our facebook application dosen't work with cookies under IE8.The reason was that if the page inside the IFRAME doesn't have a Privacy Policy, its cookies are blocked. The solution wasn't simple , so here is the code you have to add to your application:


Python:
self.response.headers["p3p"] = "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""

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"'

Brak komentarzy:

Prześlij komentarz