Firefox Tomorrow

web api instance property

NavigationHistoryEntry: id property

View on MDN ↗

The id read-only property of the NavigationHistoryEntry interface returns the id of the history entry, or an empty string if current document is not fully active. This is a unique, UA-generated value that always represents a specific history entry, useful to correlate it with an external resource such as a storage cache.

This differs from the key of a history entry. The key is a unique, UA-generated value that represents the history entry’s slot in the entries list rather than the entry itself. It is used to navigate that particular slot via traverseTo(). The key will be reused by other entries that replace the entry in the list (that is, if the navigationType is replace).

Value

A string representing the id of the NavigationHistoryEntry.

Examples

const current = navigation.currentEntry;
console.log(current.id);

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also