且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我们可以在不同域的两个页面之间使用IndexedDB吗?

更新时间:2022-12-28 09:32:23

根据

According to MDN you can't do cross domain access to an indexedDB (for security reason, you don't want that another website modify your client database):

IndexedDB遵循同源策略.因此,尽管您可以访问域中存储的数据,但不能跨不同域访问数据.

IndexedDB follows a same-origin policy. So while you can access stored data within a domain, you cannot access data across different domains.

另请参阅: