I'm currently experiencing an issue with localStorage on ie10. I have the following code snippet, which works on all browsers except ie10.
if (typeof (window.Storage) !== 'undefined' && localStorage.storageKey) {
return localStorage.storageKey;
I've seen a few similar questions and it seems like a known bug, however all the answers accepted seem to be geared towards sorting out the browser settings... which unfortunately I'm unable to ask my users to do ;)
For the problem I need it for, sessionStorage is a viable solution, which doesn't cause any issues (which I can see), so I am able to use this.
if (typeof (window.Storage) !== 'undefined' && sessionStorage.storageKey) {
return sessionStorage.storageKey;
However, I'm interested to know if anyone has experienced this and figured out a solution, without bringing in an external lib, to get localStorage working across the board?
In IE10 localStorage won't work if u gonna use file URI scheme to access your application. Just deploy your application in any application-server like apache tomcat and then access your application via localhost.
About localStorage briefly explaned click here ! Useful for further working with localStorage
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.