v3/examples/web-apis/history/frontend/index.html
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...
URL:--
history.state:
null
0
History Length
0
pushState Calls
0
replaceState Calls
0
popstate Events
← Back Forward →Go -2Go +2
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.
Click pages below to navigate. The URL updates without a page reload.
HomeProductsAboutContactSettings
🏠
Home
Welcome to the home page
Add a new entry to the browser history. This does not reload the page.
URL Path
State Data (JSON)
Title (mostly ignored by browsers) pushState
Replace the current history entry. Does not create a new entry.
URL Path
State Data (JSON) replaceState
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.
Clear Local Tracking
0--
Loading...
state: null
Clear Log History events will be logged here... Use the controls above to manipulate history and see events logged.