更改的location.hash然后preSS后退按钮 - IE浏览器的行为不同于其他浏览器浏览器、不同于、按钮、行为

2023-09-10 18:20:13 作者:等一个绿灯

更改的location.hash - 在所有浏览器这种循规蹈矩 - 页面会保持原有的和变化,而不重新加载页面唯一网址

I change location.hash - in all browsers this behave properly - the page remains original and changes only URL without reload the page.

pressing后退按钮行为有所不同的Internet Explorer和其他浏览器。 IE不改变历史的location.hash 键,进入到previous页面。其他浏览器只改变URL(改变哈希)。

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

有没有什么办法,迫使IE浏览器的行为就像其他人呢?

Is there any way to force IE browser to behave just like the others?

推荐答案

(移动我的意见在这里和扩大了一点。)的

有几个 other questions关于 #hashtag 历史怪癖与IE浏览器。

There are several other questions regarding the #hashtag history quirks with IE.

从本质上讲,IE不对待不同 #hashtags 在其历史物体独立的条目。

Essentially, IE doesn't treat different #hashtags as separate entries in its History object.

最好的解决办法似乎是的jQuery插件历史。

The best solution appears to be the jQuery History Plugin.

注意 - jQuery的历史不再保持和前维护者建议 jQuery的hashchange

Note- jquery history is no longer maintained and the former maintainers recommend Jquery hashchange