cowboy/jquery-hashchange

IE8/IE9 bug: hash history + Iframe = fail

HitmanInWis opened this issue · 6 comments

http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/

That example page documents a Safari/Chrome/Webkit issue with hashchange in an iframe (which has since been fixed by chrome).

However, it makes no mention that the same bug exists in IE8/9. Changing the hash inside an iframe in IE8/9 does not add to the browser history.

In this aspect, IE8/9 are actually worse handling hashchange than IE6/7. With IE 6/7, the special approach in the hashchange plugin that uses another hidden iframe works, even when the content being tracked is in an iframe. I tried changing the code to use that approach for IE8/9 as well, but it doesnt work because hitting the back button on a page with an iframe is not changing the iframe's hash value. Thus, polling doesn't overcome this issue either.

I'm at a complete loss for working though this issue for my site. Unfortunately I dont have the option of not running in an iframe - it is a facebook application, which runs on the FB site inside an iframe.

BTW, I did pick up this tidbit to confirm the functionality I am seeing: http://msdn.microsoft.com/en-us/library/cc288209%28v=vs.85%29.aspx
"Windows Internet Explorer 8. The browser's Back and Forward buttons do not generate onhashchange events for frames or iframes; instead, the frame is refreshed each time."

The same here.

If you go back in an IE9 hashchanged frame, the URL you retrieve with Javascript (window.location) is still the same, from before the click on the Back button. But the URL in the properties for the frame has changed to what you would expect.

I've tried to find a solution by using (parts of) the hashchange code for IE6/7, with the iframe. But nothing even close to elegant.

I have the same issue with IE8. I'm trying to solve this problem, but no clues so far.

Hey hi!!!, any update on this issue?

Hello guys, i have the same issue.
Any update on this issue?
Please help.
Thank you very much.
Regards,
Cuong

For now, no updates has been found. So sad ...

Same issue.
IE11,version: 11.0.9600.16428.
hash history+frame.