IE11 localStorage events fire twice or not at all in iframes - by hansifer2

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 811546 Comments
Status Closed Workarounds
Type Bug Repros 16
Opened 12/13/2013 11:25:47 AM
Access Restriction Public

Description

It's known that IE10 will (against spec) fire storage events locally (ie, within the same global execution context from which the event was triggered), but IE11 seems to stray even further from the w3c spec (http://www.w3.org/TR/webstorage/) when it comes to same-domain iframes:

- if the iframe is embedded in the page that triggered the storage event, the event will fire TWICE within that iframe.
- if the iframe is embedded in a page that is different from that which triggered the storage event, the event will not fire at all within that iframe.
- if the event is triggered from an iframe, it will fire TWICE locally and TWICE in any other iframe embedded in the same page, but not at all in iframes of other pages.

You can test this by opening the following link in two separate tabs side-by-side: http://hansifer.com/main.html

Last tested version: IE v11.0.9600.16476

*** UPDATE 2015-10-26 ***

I just noticed that this seems to be fixed in v11.0.9600.18059, although I can't tell when the fix dropped since it doesn't seem to be referenced in any recent KB. Perhaps someone at MS can shed some light on the fix details?

*** UPDATE 2015-12-24 ***

This is still a problem in Edge (tested EdgeHTML 13.10586)
Sign in to post a comment.
Posted by Microsoft on 4/4/2016 at 11:03 AM
We've moved! This issue is now being tracked at https://developer.microsoft.com/microsoft-edge/platform/issues/109638/
Posted by J Balinski on 4/22/2015 at 2:19 PM
Please fix this. Unable to use localStorage events in IE10 and IE11.
Posted by Blake Niemyjski on 4/10/2015 at 11:55 AM
Are there any updates on this issue? It's been over a year since this was reported and not one ounce of transparency on this issue. So much for getting frequent updates.
Posted by V.T. van der Kroef on 4/7/2015 at 8:28 AM
Maybe the multiple tab issue I mentioned in my last post isn't an issue, because the specs aren't clear about this. The event e.newValue does contain the new value that is being stored. But the other browsers I have used to test this (Chrome, Firefox) will first update the storage and then fire the event.
Posted by V.T. van der Kroef on 4/7/2015 at 7:45 AM
Any updates on this issue?

The problem is even worse.
When you have multiple tabs open the "storage" event seems to get fired in the other tabs before the storage is updated with the new value (and also before the item is removed in case of a remove). So when you are listening for the storage event in another tab, and the event fires you will get the old data from localstorage. Localstorage is just not working as it should in IE11.

Posted by Jimmy Singh on 3/18/2015 at 12:19 PM
Dear Internet Explorer Team

Do you have any update on this issue ? I am finding it very strange that Microsoft own products (CRM 2011/2013) are not fully supported on IE 11.0. Our application owners are requesting IE 10.0 but we really want them on IE 11.0 due to other IE 10.0 issues.
Posted by Matthias Bauer on 3/13/2015 at 5:50 AM
It look's like Microsoft isn't interested in that and doesn't reading anymore comments on this issue.

But I want to place an additional comment to my last comment:

The suggested workaround to get the storage events by registering the storage listener in the parent frame dosen't work in our application because we don't own the parent frame and therefore we are not allowed to register a storage event listener in the parent frame (cross domain).
It would work if the parent frame came from the same webserver as the iFrame.
Posted by Matthias Bauer on 2/27/2015 at 6:46 AM
Is there any progress in Microsoft's investigations after more than a full year?

Our application has a listener for localstorage events in an iFrame and doesn't receive the needed events. The suggested workarounds don't work for that problem.
It works fine in FireFox, Chrome, IE9, IE10 but not in IE11.
We cannot support IE11 for our application due to this bug.

Thanks in advance for a fix or at least an estimated time when it will be fixed!
Posted by Darrin Mulligan on 12/15/2014 at 6:40 AM
Our application of localstorage works in FireFox, Chrome, and IE9, but not IE11.
The workarounds unfortunately do not resolve the issue for our application.

This bug has been around for a while and it has been over 6 months since MS started to investigate.
Can we anticipate the issue will be resolved soon?

Thanks in advance for the fix!



Posted by ynov on 10/7/2014 at 5:20 AM
Our broken case is as following.
IFrame defines a "storage" listener. This iFrame or some of its sibling iFrames opens a popup window. This popup or some of its descendants performs localStorage.setItem(). In this case the above listener is not called at all.
Tested in IE11, Version:11.0.9600.17280, Update Versions: 11.0.12 KB2977629. Works in IE10 and Chrome.
Thanks in advance for the fix!
Posted by Matt Montag on 8/14/2014 at 3:09 PM
Any new updates? Hansifer did a great job demonstrating the problem. http://gifx.co/z4fn
There is no workaround for this bug in our particular use case. We're currently blacklisting IE11.
Posted by Stefan T Scherer on 6/30/2014 at 7:46 AM
Any update on this ?

We are also in the same situation as Grant were we are working with an embedded iFrame
pointed at a domain different from the parent domain and are therefore are unable to use the workaround.
This limits our MSCRM customers who limited to using IE 10,Chrome, or Firefox.

Posted by prumbles on 6/12/2014 at 12:39 PM
Grant, look at my latest workaround. This is how we solved this issue.
Posted by prumbles on 6/12/2014 at 10:01 AM
We really need this fix too. The workaround does not work for our product either. We rely on a hidden iframe to communicate between products of different origins. In IE11, our product is now broken. Thanks.
Posted by Microsoft on 6/3/2014 at 3:29 PM
Grant, I do apologize for the issue you are experiencing I wanted to share with you that this is something that we are actively investigating. Once we have more information to share about this issue we will update this connect bug.

Best regards,
The Internet Explorer Team
Posted by Grant Schenck on 5/1/2014 at 8:23 AM
We really need a fix from Microsoft for this issue. For embedded iFrames there is no workaround.

In our case this breaks a Telephony add on we developed to work in conjunction with Salesforce's web client. All of the other browsers we work with handle local storage change events correctly. Only Internet Explorer is so fundamentally broken. localStorage is a KEY part of HTML5 so at this point, Internet Explorer can not be considered HTML5 compatiable.
Posted by Microsoft on 1/28/2014 at 3:27 PM
Thank you for your feedback.

We were able to reproduce the issue and are investigating it.

Best regards,
The Internet Explorer Team