Browser API
History API

0: Introduction
1: Navigating the history
2: Add an entry to the history
3: Modify history entries
4: ▶︎ Access the current history entry state
5: The `popstate` event
6: The `hashchange` event

[← back to the Valley]

History API: Access the current history entry state

Accessing the property

history.state

returns the current state object (the first parameter passed to pushState or replaceState).

◀︎ Modify history entries
▶︎ The `popstate` event

Lessons in this unit:

0: Introduction
1: Navigating the history
2: Add an entry to the history
3: Modify history entries
4: ▶︎ Access the current history entry state
5: The `popstate` event
6: The `hashchange` event

Join my AI Workshop!

The Web Development BOOTCAMP cohort starts in February 2026