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?
For versions of Windows where Internet Explorer 9 was the final version of Internet Explorer available, support ended alongside the end of support for that version of Windows. On January 14, 2020, Microsoft released the final IE9 update for Windows Server 2008, marking the end of IE9 support on all platforms.
Why Local Storage is Insecure and You Shouldn't Use it to Store Sensitive Data. Here's the deal: most of the bad things about local storage aren't all that important. You can still get away with using it but you'll just have a slightly slower app and minor developer annoyance.
Local Storage is "local" in that exact browser and ONLY in that browser. To retrieve something stored in Local Storage, you must use the same browser, the same key and retrieve it from a page in the same origin (e.g. domain).
It is important that you know them so you can block them or delete the data stored by them: Browser local storage. Some websites use the browser's "sessionStorage" and "localStorage" to store data; "sessionStorage" is stored temporarily, but the “localStorage” is persistent.
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 in file://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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With