I’m having a lot of trouble with iframe pages being inserted into the browsing history of IE9. It’s a pain because you have to click back several times in order to get to the previous page. What is the cause of this? Is it a bug in the browser or the page?
Edit:
I realized I was using javascript to update the source of all iframes on the page to add the wmode=transparent attribute.
$('iframe').each(function () {
var url = $(this).attr("src")
$(this).attr("src", url + "?wmode=transparent");
});
This was added to combat menu navigations were going behind YouTube videos. Is there a way to prevent IE from inserting these events into the history?
An option would be to replace the iframe rather than update the source.
A history entry is made any time an iframe’s src attribute is modified after it has been inserted into the DOM. If you aren’t in control of the contents of the iframe (a third party iframe), then if they modify the location of their page in any way a history entry will be created.