IE历史记录推状态 [英] IE history push state

查看:266
本文介绍了IE历史记录推状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里用户能够通过AJAX来显示的条款和条件,无需重新加载页面时,可能一个网页。也就是说,本身是没有问题的,但是,我也试图推动一个历史状态。

I have a webpage where the user has the possibility to display the terms and conditions without reloading the page, via AJAX. That, in itself, is no problem, however, I am also trying to push a history state.

这工作正常,在大多数浏览器,除了IE浏览器。对于一些无法解释的原因,有,内容是通过AJAX加载,而且,在新标签页打开的previous页面。我该如何解决这个问题?

That works fine in most browsers, except in IE. For some inexplicable reason, there, the content is loaded via AJAX, but also, a new tab is opened with the previous page. How can I fix this?

您可以看到这个网页( http://galaxy-battle.de )的例子,尝试点击在T&放大器;铯中的加入-box

You can see the example on this webpage ( http://galaxy-battle.de ), try clicking on "T&Cs" in the "Join"-box.

推荐答案

IE9及以下<一href="http://stackoverflow.com/questions/3722815/does-internet-explorer-support-pushstate-and-replacestate">doesn't支持pushState 。调用下面一行,当你有一个例外

IE9 and below doesn't support pushState. You have an exception when calling the following line

window.history.pushState(NULL,NULL,pathFullPage);

window.history.pushState(null, null, pathFullPage);

SCRIPT438:对象不支持属性或方法pushState ?terms_and_conditions,行62字符21

SCRIPT438: Object doesn't support property or method 'pushState' ?terms_and_conditions, line 62 character 21

您也许可能是有趣的寻找上的<一个讨论一些解决方法href="http://stackoverflow.com/questions/6622449/why-is-history-pushstate-not-supported-in-ie-are-there-some-other-ways-to-ach">Why是history.pushstate()不支持IE浏览器?是否有一些其他的方法才达到这个在IE?

You may probably be interesting looking on some workarounds discussed at Why is history.pushstate() not supported in IE? Are there some other ways to achive this in IE?

这篇关于IE历史记录推状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆