最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Access Local Storage variable in all the web sites viewed on a browser - Stack Overflow

programmeradmin7浏览0评论

I have two of my websites built with asp .In one web site I am creating a local Storage variable called count.In my another application i cannot access this local local storage variable.Two web sites are HtML 5 based.

Is there any way of accessing the local storage variable in another site also.

Thanks in Advance!!

I have two of my websites built with asp .In one web site I am creating a local Storage variable called count.In my another application i cannot access this local local storage variable.Two web sites are HtML 5 based.

Is there any way of accessing the local storage variable in another site also.

Thanks in Advance!!

Share Improve this question edited May 22, 2015 at 10:32 Pavlo 45k14 gold badges83 silver badges114 bronze badges asked May 22, 2015 at 10:30 bhanu.csbhanu.cs 1,3651 gold badge11 silver badges25 bronze badges 1
  • 1 local storage can't be shared – Sushant Commented May 22, 2015 at 10:31
Add a ment  | 

2 Answers 2

Reset to default 6

LocalStorage is like cookies: you can't access one other website's variables. It's designed to avoid malicious websites to access other website's personal data.

Basically,localstorage is an advanced version of cookies that we initially used(with enhanced storage capacity).The values can be stored in key value pairs and accessed along the course of the same application.In your case,it is not possible to use localstorage as it is crossapplication.

发布评论

评论列表(0)

  1. 暂无评论