localStorage not working in Edge?

Could you please try

var something = window.localStorage.getItem('something');

Could you also check if you have 'Enable DOM Storage' selected? You can find it under: Internet Options -> Advanced tab -> Security group box

Also if you are running your page from local filesystem, localStorage doesn't work on IE, you have to run it from the web server.

Here is a link that provides more information of how to enable it


Local Storage didn't work for local files in IE9, so I imagine that this is still the case in MS Edge.

I just tested it in Edge with a server on localhost and your line of code worked just fine:

> var something = localStorage.getItem('something');
> undefined

It is possible that this was a security issue in earlier versions of IE and was just never updated as the browser was developed.

Although, it appears that localStorage and sessionStorage still don't work in Edge for HTML files accessed using the 'file://' protocol.