I am using window.History.pushstate
. It works fine in Chrome, but in IE8 it appends the path #.
Please help.
Below is my code snippet:
var History = window.History;
History.pushState(null, null, "/abc");
I am using window.History.pushstate
. It works fine in Chrome, but in IE8 it appends the path #.
Please help.
Below is my code snippet:
var History = window.History;
History.pushState(null, null, "/abc");
You wrote window.History. Did you include history.js by Benjamin Lupton? window.History and window.history is not the same thing as window.History referes to history.js and that makes the history backwards compatible with html4 browsers.
Take a look at these two:
you can refer below answer
IE9 and below don't support pushState
. You have an exception when calling the following line:
window.history.pushState(null, null, pathFullPage);
SCRIPT438: Object doesn't support property or method 'pushState' ?terms_and_conditions, line 62 character 21
You may probably be interested in looking at some workarounds discussed here: Emulate/polyfill history.pushstate() in IE