History doesn't work with iframe - by Diktar

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 806548 Comments
Status Closed Workarounds
Type Bug Repros 7
Opened 10/25/2013 4:27:25 AM
Duplicates 863651 Access Restriction Public


IE 11 doesn't seem to store history during navigation within iframe. Only stores the first url, which is iframe's src(if it has one) and if you click "Back"-button you can only go back to it. It's not an expected behavior, isn't it?
Sign in to post a comment.
Posted by Microsoft on 4/4/2016 at 9:52 AM
We've moved! This issue is now being tracked at https://developer.microsoft.com/microsoft-edge/platform/issues/102599/
Posted by skapigUI on 2/6/2014 at 6:55 AM
Glaring bug regarding frame History management which is presently entirely broken. Creates a big problem for sites that rely on it.

The history object exposed to framed pages is that of the top level window. For example, examine its initial length. Operating on it such as with history.back() results in the top level window navigating back.
Posted by Roland Collins on 12/17/2013 at 11:15 AM
FYI, another case of this bug was posted here: https://connect.microsoft.com/IE/feedback/details/809053/iframe-navigation-no-longer-adding-to-the-browser-history
Posted by Microsoft on 11/15/2013 at 8:37 AM
Thank you for your feedback. We will be investigating this issue further.

Best regards,

The Internet Explorer Team
Posted by Roland Collins on 11/13/2013 at 3:54 PM
I have the exact same issue within our internal application. It only occurs in IE11. Versions 8,9,10, Firefox, Chrome, and Safari all work correctly.

It appears that it is caused by navigating from within iframes. For example, in the attached problem recording, you can see that we have multiple levels of embedded iframes (one screenshot shows the document structure). The main page is just a wrapper page with a single iframe set to fill the page completely. This is done to keep a single address in the address bar. All navigation takes place within this inner frame, and to the user, the displayed address never changes, because the top-level iframe page never changes.

The only problem is that navigation events within that iframe do not seem to register with the browser's history. No matter where I am within our application, hitting the back button always just goes back to the first page you hit when you initially loaded the site. It's like IE just stops collecting history when you navigate content from within an iframe.

Now if I remove the wrapper page, everything works completely as expected. However, I am unable to use this as a solution, as it is a customer request that it work the way it does.

Please see attachments.
Posted by Diktar on 10/29/2013 at 3:31 AM
I think it has something to do with nested iframes
Posted by Diktar on 10/28/2013 at 3:49 AM
I have discovered, that such a wrong behavior can be reproduced for some sites only, if they are opened in the iframe, e.g. microsoft.com, as shown in example