Change location.hash and then press Back button - IE behaves differently from other browsers
I change location.hash
- in all browsers this behave properly - the page remains original and changes only URL without rel开发者_运维知识库oad the page.
Pressing Back button behaves differently in Internet Explorer and other browsers. IE does not change the history location.hash
and goes to the previous page. Other browsers only change the URL (change the hash).
Is there any way to force IE browser to behave just like the others?
(Moving my comment here and expanding on it a little.)
There are several other questions regarding the #hashtag
history quirks with IE.
Essentially, IE doesn't treat different #hashtags
as separate entries in its History object.
The best solution appears to be the jQuery History Plugin.
Note- jquery history is no longer maintained and the former maintainers recommend Jquery hashchange
精彩评论