History

JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

Core client-side JavaScript object.

Description

The History object is a predefined JavaScript object that allows you to navigate through the history of Websites that a browser has displayed. The browser stores a history of visited URLs in a list, which the History object references. Table 7.30 shows the methods and properties of the History object.

Table 7.30. Properties and Methods of the History Object
Property Description
back() Loads the URL for the previous visited Web site
current Refers to the current URL in the history list
forward() Loads the next URL in the history list
go() Loads a URL from the history list
length Returns the number ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.