|
LocationReplaceMethod
The location.replace method
MSDN: "When a document is replaced, it is also removed from the history object. Moreover, the user interface navigation methods, such as the Back and Forward buttons, will no longer access the URL." Mozilla Developer: "The difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the Back button to navigate to it." Usagelocation.replace(url) Argumentsurl = New location to load, replacing current page in history. Browser compatibility
Further reading |
Sign in to add a comment

The browser compatibility here is misleading. Certain browsers only half-support this method. As certain browsers don't replace the page in history. So, you can still hit back to get to the last page. For example, Safari, and the new Google Chrome, both don't replace the page in history.