Answer the question
In order to leave comments, you need to log in
How to use history.replaceState in pre-10 Internet Explorer?
Please help!
My javascript code doesn't handle history.replaceState() in Internet Explorer prior to version 10. Gotta fix it somehow! How can I rewrite the code below so that it starts working in all browsers?
window.history.replaceState({}, window.location.pathname, window.location.pathname);
Answer the question
In order to leave comments, you need to log in
In IE < 10, you still can't do anything, the browser simply doesn't have this interface and you can't do replaceState.
Libraries like history.js only emulate this behavior using hash (#) navigation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question