Javascript Reference - History Object








The history object contains the URLs visited by the user.

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

History Object Properties

Property Description
length Returns the number of URLs in the history list

History Object Methods

Method Description
back() Go to the previous URL in the history list
forward() Go to the next URL in the history list
go() Go to a specific URL from the history list