2017-03-17 1 views
0

xxx.com yyy.com의 indexeddb에 액세스하는 방법.
이 두 도메인에는 동일한 스크립트 이 포함될 수 있습니다."Cross Domain IndexedDB"가능 여부

Iframe 기술로 가능합니까?

+3

가능한 중복 http://stackoverflow.com/questions/23874290/can-we-use-indexddb-objects-stores-between-two-pages) - TL, DR, 아니, 그것은 끔찍한 일이 일어날 수 있도록하기 때문에 불안합니다. –

답변

0
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. 
([우리가 IndexdDB는 두 페이지를 저장 개체를 사용할 수]의
관련 문제