IT lexicon › Web › Navigation API

Navigation API

Web På svenska → Updated: 2026-07-29

The successor to the History API, built so single-page applications can handle navigation without the ugly tricks that have been necessary for fifteen years.

The old interface had two fundamental gaps: you could not intercept a user clicking a link, and you could not read the history. Framework routers worked around it by hijacking clicks, monkey-patching pushState and guessing which direction a back button went. The new API fires a navigate event for all same-origin navigation, where intercept() takes over handling and lets you return a promise the browser waits on — which it uses to manage scroll position, focus and the loading indicator correctly. The history is readable as navigation.entries(). Chromium has supported it since 2022 and the other browsers followed later.

← Back to the lexicon