V
V
Vlad2015-05-13 16:00:59
JavaScript
Vlad, 2015-05-13 16:00:59

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);

Perhaps these links can help solve the problem:
habrahabr.ru/post/123106
https://github.com/balupton/History.js/
I practically don’t understand javascript at all - please explain on your fingers what to do, where to register.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-05-13
@IonDen

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 question

Ask a Question

731 491 924 answers to any question