Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

The History object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


The History object


The History object

The History object contains URLs that have been accessed by the user (in the browser window).

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

The History object Note: There is no public standard applied to Thestory object, but it is supported by all browsers.


The History object property

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

The History object method

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