Mikulas Dite Mikulas Dite - 1 year ago 197
Javascript Question

localStorage object is undefined in IE

I'm using localStorage in my JS application and I was wondering why IE9 claims

localStorage == undefined
. As far as I know, IE8 supports it, is here any way to get it working in the new version?

Answer Source

Are you testing this on a local HTML file? i.e. a file:/// URL?

localStorage is only available on HTTP websites. That hasn't changed in IE9 Dev Preview.