local storage in IE9 fails when the website is accessed directly from the file system

Yeah, IE9 doesn’t support localStorage for local files. Not in any official documentation that I can find, but the same issue is described in this blog.

You’ll have to either host the website externally, or find some other method of persisting data. [Support for HTML5-style local storage is still in beta in many browsers, anyway. Especially for pages on the local filesystem.]

You could try userdata behaviors, which is a pre-W3C solution developed by Microsoft for Internet Explorer. Not sure if it supports local filesystems, though. Links:

  1. http://www.javascriptkit.com/javatutors/domstorage2.shtml
  2. http://msdn.microsoft.com/en-us/library/ms531424(VS.85).aspx

References:

  1. https://bugzilla.mozilla.org/show_bug.cgi?id=507361
  2. https://stackoverflow.com/a/7377302/1122351

Leave a Comment