Answer the question
In order to leave comments, you need to log in
How can I make the page reload when I click the back button in the browser?
If you switch from /home.php to /catalog.php, then the back/forward buttons in the browser work fine (they move through the history with a page reload). But if you switch between records in the history that are on the same file (/catalog.php) but have different GET parameters, then the page will not be reloaded. For example, we were at /catalog.php?category=1 and clicking on a product opened a pop-up window, when opened, the address changed via history.pushstate to /catalog.php?id=1. Now, if you click on the back button in the browser, the address bar will change to /cataloh.php?category=1, but the content will not change in any way. It would not be desirable to load through AJAX.
How to solve this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question