Name

length — NN 2 IE 3 DOM n/a

Synopsis

Read-only

The number of items in the history list. Even with this information, you are not allowed to extract a specific history entry except with signed scripts and the user’s permission in Navigator 4 or later.

Example

if (history.length > 4) {
    ...
}

Value

Integer.

Default

None.

Get Dynamic HTML: The Definitive Reference 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.