History object
History object
The History object contains the URLs that the user has visited (in the browser window).
The History object is part of the window object and can be accessed via the window.history property.
Note: There is no public standard applied to the History object, but all browsers support it.
History Object Properties
| property | Description |
|---|---|
| length | Returns the number of URLs in the history list. |
History Object Methods
| Method | Description |
|---|---|
| back() | Loads the previous URL in the history list. |
| forward() | Loads the next URL in the history list. |
| go() | Loads a specific page in the history list. |