The history object contains the URLs visited by the user.
The history object is part of the window object and can be written without the window prefix.
The History object allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
The following table lists the properties of the History object:
|length||Returns the number of URLs in the history list, including the currently loaded page|
The following table lists the methods of the History object:
|back()||Goes to the previous page in session history, the same action as when the user clicks the browser's Back button|
|forward()||Goes to the next page in session history, the same action as when the user clicks the browser's Forward button|
|go()||Loads a page from the session history, identified by its relative location to the current page, for example -1 for the previous page or 1 for the next page|