history
Safe to use with fallbackapiThe History API provides a way for JavaScript to change the URL displayed in the browser without reloading the page.
- Verdict
- Safe to use
- Category
- JavaScript APIs
- Browser support
- Can I Use
- Works in
- all modern browsers
Should you use history in 2026?
There are several approaches to providing a fallback. The simplest is to fall back to page refreshes. Alternatively, the History.js plugin smooths out some browser implementation differences and provides an optional hashchange fallback for HTML 4 browsers. GitHub uses pjax (pushState + ajax).
Polyfills and fallbacks
Progressive enhancement works well here: browsers without support degrade gracefully, so a dedicated polyfill is usually unnecessary.
Please