cowboy / jquery-hashchange

This jQuery plugin enables very basic bookmarkable #hash history via a cross-browser HTML5 window.onhashchange event.
http://benalman.com/projects/jquery-hashchange-plugin/
GNU General Public License v2.0
1.21k stars 258 forks source link

IE8/IE9 bug: hash history + Iframe = fail #17

Open HitmanInWis opened 13 years ago

HitmanInWis commented 13 years ago

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."

thimo commented 12 years ago

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.

chrisbenseler commented 12 years ago

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

cayasso commented 12 years ago

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

cuongvu commented 12 years ago

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

abucus commented 10 years ago

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

claudia1204 commented 9 years ago

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