History API Demo

The History API allows manipulation of the browser session history, enabling single-page applications (SPAs) to update the URL without full page reloads.

History API: checking...

Current State

URL: --
history.state:
null
0
History Length
0
pushState Calls
0
replaceState Calls
0
popstate Events

Navigation Controls

Note on Navigation
The back/forward buttons use history.back() and history.forward(). You can also use history.go(n) to jump multiple entries. Navigation will trigger the popstate event.

Simulated SPA Navigation

Click pages below to navigate. The URL updates without a page reload.

Home Products About Contact Settings
🏠
Home
Welcome to the home page

pushState

Add a new entry to the browser history. This does not reload the page.

replaceState

Replace the current history entry. Does not create a new entry.

History Stack (Local Tracking)

Note: The History API does not provide access to the full history stack for privacy reasons. This list tracks only entries created during this session.

0 --
Loading...
state: null

API Support

Event Log

History events will be logged here... Use the controls above to manipulate history and see events logged.