localStorage event fired in source window - by Dave Lockhart

Status : 

  Postponed<br /><br />
		Due to current priorities, the product team decided to postpone the resolution of this item.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

ID 774798 Comments
Status Resolved Workarounds
Type Bug Repros 4
Opened 12/19/2012 2:47:23 PM
Access Restriction Public


This pertains to the HTML5 localStorage functionality, as outlined here:

From the localStorage specification (http://dev.w3.org/html5/webstorage/#localStorageEvent):
"When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a local storage area, if the methods did something, then for every Document object whose Window object's localStorage attribute's Storage object is associated with the same storage area, other than x, send a storage notification."

This means that a storage event should be fired in every window/tab EXCEPT the one that updated the localStorage object which caused the event.

The correct behavior is happening in Firefox (17), Chrome (23) and Safari (5.1.7), however IE9 and IE10 both incorrectly fire the storage event in ALL windows/tabs, specifically the one that originated the change.

This has been discussed on StackOverflow here:

And here:
Sign in to post a comment.
Posted by Microsoft on 4/4/2016 at 8:27 AM
We've moved! This issue is now being tracked at https://developer.microsoft.com/microsoft-edge/platform/issues/74861/
Posted by hansifer2 on 12/24/2015 at 9:12 AM

The reasoning is that it's often desirable to distinguish same-window events from external events.

The fundamental problem with IE's approach is that it's IMPOSSIBLE in the handler to distinguish a same-window event from an external one. If the event object were to carry some information to that effect, then practically speaking this would not be an issue (it's still an annoyance though since we have to code a special case for IE).

The spec, on the other hand, makes it possible (but not necessary) to handle same-window events differently from external events, since a same-window event can be easily implemented without needing to make use of the 'storage' event.
Posted by hansifer2 on 12/24/2015 at 8:40 AM
This appears to be fixed in EdgeHTML 13.10586
Posted by GTrz on 12/30/2014 at 6:17 AM
I don’t see this as a bug, this should be a specs bug and a Firefox and Chrome bug, why should we not notify the tab that made the change?

I just finished a small piece of code that works beautifully on IE and does not work on Chrome and Firefox due to this unnecessary limitation
Posted by Microsoft on 8/28/2013 at 11:51 AM
Hello Jesse,
This connect feedback issue is still active although it currently is listed as resolved\postponed. This issue will be considered for a future version of Internet Explorer. We are still tracking this issue.
Best regards,
The Internet Explorer Team
Posted by Jesse Redl on 8/27/2013 at 7:23 PM
I don't understand why this was closed. This is definitely an issue in IE9 and 10.
Posted by Microsoft on 2/27/2013 at 7:45 AM
Thank you for your feedback.

Every piece of feedback we receive is important to us and helps us improve the quality of Internet Explorer. Unfortunately, we are currently unable to address your feedback. We will consider fixing this issue in the future.

We continue to welcome more feedback, so please don't hesitate to report other ways that we can improve Internet Explorer.

Best regards,

The Internet Explorer Team
Posted by Microsoft on 1/8/2013 at 7:21 AM
Thank you for your feedback. We will be investigating this issue further.

Best regards,

The Internet Explorer Team
Posted by Dave Lockhart on 1/7/2013 at 1:37 PM
It appears as though my original attachment failed because it was an HTML document. I've re-attached as a ZIP file and re-opened the issue. Thanks!
Posted by Microsoft on 1/7/2013 at 12:04 PM
Thank you for your feedback.

There is insufficient information to reproduce the behavior you are observing.

We value your feedback. If you have additional information, please reactivate the bug or submit a new bug with more details on how to reproduce the issue. You can also read the guidelines at <https://connect.microsoft.com/IE/content/content.aspx?ContentID=16254> regarding filing a good bug report.

Best regards,

The Internet Explorer Team