We recently switched from cookies to using sessionStorage - the trigger for switching was IE issues.
Now, we're discovering that sessionStorage doesn't work across sub-domains - the storage of www.site.com
is isolated from that of site.com
.
Is there a modern alternative to get the two to cooperate? This is easily accomplished by cookies, but I'd hate to revert from sessionStorage, or (gasp) use both methods concurrently.
postMessage
. – GiesserlocalStorage
andpostMessage
. I've updated the answer with a full sample code for getting/setting/removing data across domains you own. The only possible drawback could be that the storage is unavailable until the frame is loaded. – Giesser