The window.appHistory API provides the ability to intercept navigations as well as introspect an application's history entries. This provides a more useful alternative to window.history, specifically aimed at the needs of single-page web applications.

Motivation

The existing window.history API is hard to deal with in practice, especially for single-page applications. In the best case, developers can work around this with various hacks. In the worst case, it causes user-facing pain in the form of lost state and broken back buttons, or the inability to achieve the desired navigation flow for a web app.

Demos

Specification

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink>History


Origin trial (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Intent to Prototype url

Intent to Prototype thread

Comments

The current implementation status of the API versus the spec/explainer is tracked at https://docs.google.com/document/d/1vmxjUzn7qccn9xwVoIKRKVEPrIstrPzztg0chlgLAMY/edit

Search tags

apphistory, history,

Last updated on 2021-11-25