Demonstrating history.replaceState()

Press the following button to call history.replaceState() to replace the current entry with a new one, meanwhile also replacing the URL in the browser's address bar.

Notice that when you press this button, the browser's back button is still disabled. This is because there is no entry before. Calling replaceState() replaced the current entry — not added a new one.