I've set up a page where I'm using the following code so when you click on a link the content and URL changes without refreshing:
window.history.pushState("object or string", "title", "/photo.php");
But when a user clicks on the back button the content doesn't change back. How to detect the back button?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…