HTML5 Local Storage data not reflected across active tabs/windows in IE 11

Deadly 提交于 2019-12-06 03:43:48

I tested many ideas, for me attaching an empty event handler for onstorage property worked!

The WindowEventHandlers.onstorage property contains an event handler that runs when the storage event fires. This occurs when a storage area is changed (e.g. a new item is stored.)

here is my code

    window.onstorage = function(e){};

Microsoft is well aware of the issue, but after about 3 years , there is still no fix and probably it will never be. more info here

This is a known bug: https://connect.microsoft.com/IE/feedback/details/812563/ie-11-local-storage-synchronization-issues

There is a workaround added to the bug report that you can use indexedDB, which is synchronized among frames. But before you can create a DB, the user need to give your web app permission to create a database.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!