IE Current History Status

I have a web page where the user is able to display the terms and conditions without reloading the page through AJAX. However, this is not a problem in itself, but I am also trying to promote the state of the story.

This works great in most browsers except IE. For some inexplicable reason, the content is loaded via AJAX, but also a new tab opens from the previous page. How can i fix this?

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

+5
source share
2 answers

IE9 and below does not support pushState . You have an exception when calling the next line

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

SCRIPT438: object does not support property or method 'pushState'? terms_and_conditions, line symbol 62

You might be interested to see some workarounds discussed in Emulate / polyfill history.pushstate () in IE

+10
source

An old but still current question. I just want to say that I recommend not trying to emulate pushState in IE.

Instead, you can use function detection:

  • if history.pushStatenot null (browser supports pushState), you use it and load your content with excellent javascript

  • history.pushState null ( pushState), URL/

, , IE <= 9 , . , , : , #?

, . , Google. , IE history.js, , .

, . , js- IE .

+2

All Articles