Can we use IndexdDB objects stores between two pages

后端 未结 1 595
野的像风
野的像风 2021-01-18 21:39

I have created a IndexdDB object store in my one page (Let object store name is \"ShopStore\"). Now I want to open the same object store from a diffirent page. Is it possibl

相关标签:
1条回答
  • 2021-01-18 22:03

    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 follows a same-origin policy. So while you can access stored data within a domain, you cannot access data across different domains.

    See also:

    • cross domain reading data from browser storage
    • Is it possible for a Chrome extension to access an IndexedDB database created by a specific domain?
    0 讨论(0)
提交回复
热议问题