开发者

Setting cookies within an iFrame

开发者 https://www.devze.com 2023-03-30 05:29 出处:网络
I know this is a very talked about subject but just wanted to check something with you knowledgeable people.

I know this is a very talked about subject but just wanted to check something with you knowledgeable people.

I've got a domain, say domain-A, that is out of my control, housing an application from domain-B, developed by me, in an iFrame. The application within the iFrame uses cookies a lot. Should this work?

I'm not trying to read cookies between domain-A and domain-B, I purely want to set cookies in domain-B and read them in domain-B.

All seems fine in Chrome but IE doesn't want to play the game.

Can anybody give me som开发者_JAVA技巧e guidance please?

Thanks,

Andy.


From the server point of view, this should work fine. Your domain B will receive cookies from the IFRAME, as if it were just another web-page.

From the client side: sending the cookie could depend on policies set by the browser, of even by the user. Fiddle with the security level of your domain and the cookie settings in IE to get a hint of what is going on.

0

精彩评论

暂无评论...
验证码 换一张
取 消