问题
xxx.com how to access indexeddb of yyy.com.
These 2 domain includes same script
is it possible.
Possible with Iframe technique?
回答1:
You can do it with iframe technique (loading iframe with same domain in different domains)
example:
myStorageIframe.com
a.com
b.com
c.com
you can add the iframe to each domain, and store/get items with post-message. each domain will communicate with the frame, and by this the storage will be shared between all domains.
The pitfalls of this is that in Safari it will make a lot of problems, since their security policy is very strict with cross-domain & third-party storages.
来源:https://stackoverflow.com/questions/42854313/is-cross-domain-indexeddb-possible