3

Possible Duplicate:
use localStorage across subdomains
Cross-domain localStorage with iframes (Chrome)

I think I know the answer already but I'm wondering if there is any support or possibility of storing localStorage and sessionStorage via wildcard domain?

The only solution I've come up with is storing it in a single domain then use a hidden iframe and postMessage / receiveMessage to accomplish this for storing and retrieving across my subdomains as I use wildcard subdomains to drive data. This works but is a hack and requires an iframe load each time as an extra request. Any other suggestion that is cleaner besides using wildcard cookies that bulk up the bandwidth?

Community
  • 1
  • 1
King Friday
  • 19,950
  • 9
  • 78
  • 78
  • 3
    If there aren't any solutions, it may be worth bringing it up to the WHATWG or HTMLWG. – 0b10011 Jul 26 '12 at 02:54
  • I have gone so far with this implementation and I have to say its working quite well. I'll post a full solution with postMessage and the technique of doing callbacks even through serialized objects which is quite elegant. – King Friday Aug 03 '12 at 03:20

0 Answers0