Searched everywhere and didn't find straight answer.
Does CORS make cross-(sub)domain localStorage sharing possible or not?
And how about on IE8?
相关问题
- firebase storage cors strange Behaviour
- Javascript does not work in IE8
- IE8 Form Not Submitting (Intermittent)
- How do I add CORS to a compojure-api app?
- CORS issue with Twitter api calls in Webpack dev s
No, you cannot directly access another origin's storage, regardless of CORS settings.
You could however have a remote AJAX service that could store your settings on the remote domain.
e.g. Say your main website
www.maindomain.com
returns headerAccess-Control-Allow-Origin: https://www.subsite.com
for its AJAX requests.Then your other website
www.subsite.com
can make an AJAX request to e.g.https://www.maindomain.com/storage
to retrieve or to save details cross-origin. The local storage forwww.maindomain.com
can be returned as a JSON object in the response forwww.subsite.com
to use.