跨域localStorage

时间:2014-03-22 06:06:35

标签: html5 local-storage

我尝试通过复制以下链接中的代码来实现跨域本地存储,

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

但它正在返回' null'。

我做了以下

  1. 从A.com中的页面 - 存储本地存储的值
  2. 在localhost中运行的应用程序中,根据链接
  3. 中提供的代码创建了server.htm
  4. 根据链接
  5. 创建了cross_domain_storage.js
  6. 在localhost应用程序中创建了index.html,并尝试访问在步骤1中编写的密钥
  7. 但返回的值是' null'

    我的代码出了什么问题?

1 个答案:

答案 0 :(得分:1)

我不熟悉该特定解决方案,但我确实编写了一个使用共享iframe实现跨域本地存储的库。

欢迎您在github查看。它还带有angularjs支持:)

相关问题