Everybody say that window.localStorage is supported by IE (until IE8)
I test it on IE9 but :
console.log(typeof window.localStorage)
undefined
what does it mean?
What’s the best way to store local data for all browser?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Local Storage is stored relative to an origin.
This means you must open your page using
http://someorigin/pathtoyourpage.html. It can’t work on IE if you’re opening the page infile://pathtoyourpage.html(and shouldn’t work on other browsers).So you need to access your page using a web server (it can be on localhost).