History API: Access the current history entry state

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


Accessing the property

history.state

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

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
7: Had an issue with bfcache - html - platform