Andrew's Digital Garden

Navigation API

Essentially, the newer version of the 'History API'.

The new navigation API provides a new interface for navigations and session history, with a focus on single-page application navigations.

The new API brings a lot of goodies.

Of note, it allows an application to synchronise its state and the way it handles navigations with the way browsers handle navigations. No longer do you need to add event listeners to every link and intercept them, you can just use the navigate event.

It also helps you introspect the history and state of your page through navigation.entries, rather than relying on indexes like history.go(-2) does.

As of Aug 2022 this is still a work in progress, only available in Chrome Canary.

[[browsers]] [[web]]

Navigation API