user3122606
user3122606

Reputation: 67

Cross domain localStorage

I tried to implement cross domain local storage by copying the code from the below link,

http://www.nczonline.net/blog/2010/09/07/learning-from-xauth-cross-domain-localstorage/

But it is returning 'null'.

I did the following

  1. From the page in A.com - stored the value for local storage
  2. In the application running in localhost created server.htm as per the code provided in the link
  3. created cross_domain_storage.js also as per the link
  4. created index.html in localhost application and tried to access the key written at Step 1

But the value returned is 'null'

What is wrong with my code ?

Upvotes: 0

Views: 3784

Answers (1)

Ofir D
Ofir D

Reputation: 818

I'm not familiar with that specific solution but I did write a library that implement cross domain local storage using a shared iframe.

you are welcome to check it out on github. It comes with angularjs support as well :)

Upvotes: 1

Related Questions