是“跨域索引数据库"吗?可能的 [英] Is "Cross Domain IndexedDB" possible

查看:37
本文介绍了是“跨域索引数据库"吗?可能的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xxx.com如何访问yyy.com的indexeddb.
这2个域包含相同的脚本有可能.

xxx.com how to access indexeddb of yyy.com.
These 2 domain includes same script is it possible.

是否可以使用iframe技术?

Possible with Iframe technique?

推荐答案

您可以使用iframe技术(将具有相同域的iframe加载到不同域中)

You can do it with iframe technique (loading iframe with same domain in different domains)

example:
myStorageIframe.com
a.com
b.com
c.com

您可以将iframe添加到每个域,并使用后消息存储/获取项目.每个域都将与框架进行通信,由此,存储将在所有域之间共享.

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.

这样做的陷阱是,在Safari中,由于跨域&第三方存储.

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.

这篇关于是“跨域索引数据库"吗?可能的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆