Javascript Reference - History Object








The history object contains the visited URLs.

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

History Object Properties

Property Description
length Get 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