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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access