I'm replacing cookies with localStorage on browsers that can support it (anyone but IE). The problem is site.example
and www.site.example
store their own separate localStorage objects. I believe www
is considered a subdomain (a stupid decision if you ask me). If a user was originally on site.example
and decides to type in www.site.example
on her next visit, all her personal data will be inaccessible. How do I get all my "subdomains" to share the same localStorage as the main domain?
This is how I use it across domains...
parent.example
child.example
domain, just do a postMessage to your parent.example
iframeparent.example
iframe.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With