3 ms·
People just need to know when to use replaceState instead of pushState. https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState https://developer
by pedroma 6y ago
People just need to know when to use replaceState instead of pushState.
https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState https://developer.mozilla.org/en-US/docs/Web/API/History/rep...
- splintercell 6y agopushState maybe sometimes used but replaceState should never be used. Seriously, many times I was on a website where scrawling introduce you to new article but it also replace the URL oh, now I wanted to go back to the original article because I wanted to share with you but I couldn't. at least with a push State I could retrace my steps and not rely on the developer guessing where I might have been going.