Skip to content

History API

The History API enables navigation through the browser session history and modifying the history stack for SPA navigation.

pushState() adds history entries (SPA navigation). replaceState() modifies current entry. popstate event fires on back/forward. Essential for SPAs.