History Object


History object

The History object contains URLs that the user has visited (in the browser window).

The History object is part of the window object and can be accessed through the window.history property.

NoteNote: There is no published standard that applies to the History object, but it is supported by all browsers.


History Object Properties

PropertyDescription
lengthReturns the number of URLs in the history list

History Object Methods

MethodDescription
back()Load the previous URL in the history list
forward()Load the next URL in the history list
go()Load a specific page in the history list