Here are some common methods of the Window.History object:
Takes the user back to the previous page of history.
Takes the user to the next page of history.
Takes the user n pages away from the current page of history. A negative value for n will take the user n pages back, while a positive value will take the user n pages forward.
Adds a new entry to the browser's session history with the specified state object, title, and URL. This method doesn't actually navigate to the new URL, but it does allow you to update the URL displayed in the address bar.
Replaces the current entry in the browser's session history with the specified state object, title, and URL. This method doesn't create a new entry in the history, but it does allow you to update the URL displayed in the address bar.
The history.pushState() and history.replaceState() methods can be used to replace the URL shown in the address bar, without requiring a full page reload. It can be used to build single-page apps or update URLs to reflect AJAX request-enabled changes.
Be aware that browser security rules include restrictions on how you can use the history object. For example, the script may travel through the user's history only if the user clicked a link or button in the user interface for the first time.