JavaScript localStorage object broken in IE11 on Windows 7

后端 未结 4 1745
醉话见心
醉话见心 2020-11-27 04:08

The localStorage object in Internet Explorer 11 (Windows 7 build) contains string representations of certain functions instead of native calls as you would expe

4条回答
  •  半阙折子戏
    2020-11-27 05:07

    My localStorage returned undefined and I couldn't figure out why - until I realized that it was because I was running the HTML-page (with the localStorage script) directly from my computer (file:///C:/Users/...). When I accessed the page from a server/localhost instead it localStorage was indeed defined and worked.

提交回复
热议问题