I'm not able to store session cookies in an IFRAME when using IE 7.
I've googled on this and got info about P3P and compact privacy
headers. The headers got the cookies working with IE 6 but not with IE
7. I've even tried several options with the p3p.xml and privacy.xml
settings with no luck.
If anyone has tackled this issue, pl. let me know how.
Hello,
hm.. seems a bit strange, adding a P3P header should just work.
I use Coldfusion, and there's only one line of code for that:
<cfheader name="P3P" value='CP="CAO PSA OUR"'>
and it does all the magic, works prefectly fine in IE 6 and 7, and FF.
Ed
On Apr 23, 3:11 am, Nikhil Gupte <nikhilgu...@gmail.com> wrote:
> I'm not able to store session cookies in an IFRAME when using IE 7.
> I've googled on this and got info about P3P and compact privacy
> headers. The headers got the cookies working with IE 6 but not with IE
> 7. I've even tried several options with the p3p.xml and privacy.xml
> settings with no luck.
> If anyone has tackled this issue, pl. let me know how.
I tried this using the following "P3P" header value for my iframe and
this worked fine in IE7. IE7 allowed the nested Iframe to create the
cookies.
CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
NestIframeJSP.jsp -->
<%
response.setHeader("P3P","CP=\"ALL ADM DEV PSAi COM OUR OTRo STP IND
ONL\"");
%>
<HTML>
<HEAD>
<script>
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return
c.substring(nameEQ.length,c.length);
}
return null;
}
</script>
</HEAD>
<BODY>
<%
session.setAttribute("name","value" );
out.println("Server created the JSESSIONID cookie by creating a
session.");
%>
<hr/>
Running javascript to retrieve these cookies <div
id="placeholder"></div>
<script>
document.getElementById("placeholder").innerHTML="JSESSIONID's
value is "+readCookie('JSESSIONID');
</script>
</BODY>
</HTML>
On Apr 22, 8:11 pm, Nikhil Gupte <nikhilgu...@gmail.com> wrote:
> I'm not able to store session cookies in an IFRAME when using IE 7.
> I've googled on this and got info aboutP3Pand compact privacy
> headers. The headers got the cookies working with IE 6 but not with IE
> 7. I've even tried several options with thep3p.xml and privacy.xml
> settings with no luck.
> If anyone has tackled this issue, pl. let me know how.
Thanks guys. The problem I had seemed to be with a particular
combination of Apache (2.2) + mongrel. For some reason, IE7 ignored
the P3P header. Didn't have the problem if I used mongrel directly or
behind nginx. Still don't know why it happened, but for now nginx
+mongrel seems to work well with IE7.
> I tried this using the following "P3P" header value for my iframe and
> this worked fine in IE7. IE7 allowed the nested Iframe to create the
> cookies.
> CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
> NestIframeJSP.jsp -->
> <%
> response.setHeader("P3P","CP=\"ALL ADM DEV PSAi COM OUR OTRo STP IND
> ONL\"");
> %>
> <HTML>
> <HEAD>
> <script>
> function readCookie(name) {
> var nameEQ = name + "=";
> var ca = document.cookie.split(';');
> for(var i=0;i < ca.length;i++) {
> var c = ca[i];
> while (c.charAt(0)==' ') c = c.substring(1,c.length);
> if (c.indexOf(nameEQ) == 0) return
> c.substring(nameEQ.length,c.length);
> }
> return null;
> }
> </script>
> </HEAD>
> <BODY>
> <%
> session.setAttribute("name","value" );
> out.println("Server created the JSESSIONID cookie by creating a
> session.");
> %>
> <hr/>
> Running javascript to retrieve these cookies <div
> id="placeholder"></div>
> <script>
> document.getElementById("placeholder").innerHTML="JSESSIONID's
> value is "+readCookie('JSESSIONID');
> </script>
> </BODY>
> </HTML>
> On Apr 22, 8:11 pm, Nikhil Gupte <nikhilgu...@gmail.com> wrote:
> > Hi,
> > I'm not able to store session cookies in an IFRAME when using IE 7.
> > I've googled on this and got info aboutP3Pand compact privacy
> > headers. The headers got the cookies working with IE 6 but not with IE
> > 7. I've even tried several options with thep3p.xml and privacy.xml
> > settings with no luck.
> > If anyone has tackled this issue, pl. let me know how.