Name
History — the URL history of the browser
Availability
Client-side JavaScript 1.0; additional features available in Navigator 4 with the UniversalBrowserRead privilege
Synopsis
window.history frame.history history
Properties
- current
The URL of the currently displayed document. Navigator 4; requires UniversalBrowserRead.
- length
The number of elements in the history array. Navigator 2, Internet Explorer 4.
- next
The URL of the next document in the history array. Navigator 4; requires UniversalBrowserRead.
- previous
The URL of the previous document in the history array. Navigator 4; requires UniversalBrowserRead.
Methods
- back()
Return to the previous URL. JavaScript 1.0.
- forward()
Visit the next URL. JavaScript 1.0.
- go(relative_position, target_string)
Revisit a URL. JavaScript 1.0; enhanced in JavaScript 1.1.
- toString()
Return browsing history, formatted in HTML. Navigator 4; requires UniversalBrowserRead.
Get Webmaster in a Nutshell, Second Edition 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.