1

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

Possible with Iframe technique?

Mesut Yiğit
  • 649
  • 10
  • 21
  • 3
    Possible duplicate of [Can we use IndexdDB objects stores between two pages](http://stackoverflow.com/questions/23874290/can-we-use-indexddb-objects-stores-between-two-pages) - TL;DR, no, because it would be horrendously insecure to allow that to happen. – Joe Clay Mar 17 '17 at 09:58

1 Answers1

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.

DanMan
  • 11,323
  • 4
  • 40
  • 61
bgauryy
  • 416
  • 3
  • 7