Is “Cross Domain IndexedDB” possible

荒凉一梦 提交于 2021-02-08 10:30:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!