D
D
Denis Bukreev2017-02-19 14:54:35
JavaScript
Denis Bukreev, 2017-02-19 14:54:35

History.pushState - when you go "back" in the browser, the address is updated, but the page is not - how to update the page?

So it goes.
I change the address (during ajax requests, opening modal windows and other global changes on the page) using the History.pushState plugin.
Great, the address is now working.
But when you go back/forward, the state of the page does not change.
How to arrange it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2017-02-19
@AMar4enko

https://developer.mozilla.org/en-US/docs/Web/API/W...
and manage the page state based on the active url

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question