与IE浏览器的问题哈希后退按钮 [英] Problem with IE Hash back button
问题描述
我有一个问题,AJAX页面加载和后退按钮。我跟踪通过修改散列值的变化。在Firefox中,我能后退按钮完全由间隔检查工作的JavaScript的哈希,看它是否改变。在IE中,我遇到了一个问题,即IE浏览器甚至没有保持它的历史。
例如,
我页:
a.html#A
然后我点击:
a.html·B
现在,当我preSS后退按钮,我希望它去a.html#一个,而是它返回到页面之前。不要紧,我有多深得到的,它总是去之前的页面,以a.html#一个。
怎么办?我读了一些解决方案,看来我应该载入一个隐藏的iframe的地方在页面上,但即使这是行不通的。在a.html页被AJAX装入页上的容器。切换到IFRAME是不是在这一点上的选择我。
请帮忙。
解决方案我几个星期前也有类似的问题,
我是用第j 查询历史记录插件来处理这个问题。
如果您有实现它的问题,我可以帮你。但它是非常容易的。
I have an issue with ajax loading pages and the back button. I keep track of changes by modify the hash value. On firefox, I can get the back button to work perfectly by interval checking in javascript for the hash to see if it changes. On IE, I'm running into a problem where IE is not even keeping it in the history.
For example,
I have page:
a.html#a
Then I click:
a.html#b
Now when I press the back button, I'd expect it to go to a.html#a, but instead it goes back to the page before that. It doesn't matter how deep I get, it always go to the page prior to a.html#a.
What gives? I read some solutions and it appears I should load a hidden iframe somewhere on the page, but even that doesn't work. The pages in a.html are ajax loaded into a container on the page. Switching to iframe is not an option for me at this point.
Please help.
I had a similar problem some weeks ago. See this SO issues: my question, and a similar which helped me out.
I am using the jQuery history plugin to handle that problem.
If you have problems implementing it, i can help you. but it was very easy.
这篇关于与IE浏览器的问题哈希后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!