Passing cookie data between iframes

Let's say I have a website, www.example.com, with an login box, which is located in the iframe located on api.example.com. My question is:

  • Is it possible to transfer cookie data from the internal iframe (api.example.com to the website, so the website knows when the user is logged in?
  • Is it possible to do this on the client side, without having to refresh the entire page? How will the fact that the user is registered on the website be conveyed?

Any solution that works on FF and IE 6/7 will be great.

+3
source share
2 answers

cookie . cookie .

Response.Cookies("COOKIENAME").Domain = ".example.com"
Response.Cookies("COOKIENAME").Value= "foo"
+4

, api.example.com www.example.com, , cookie example.com. cookie .

FF3 IE8, postMessage , () . IE6/7 AJAX , , , , .

+2

All Articles