v147 · Service Worker · Web APIs

Request.isReloadNavigation attribute

A boolean on FetchEvent.request that is true when the navigation was a user-triggered reload — the Refresh button, location.reload(), or history.go(0) — rather than a regular link click or address-bar navigation.

concepts

  1. Reload vs Navigate

    Registers a live service worker that intercepts navigation fetches, reads isReloadNavigation, and posts the result back to the page. Navigate here and reload to see the value flip.

  2. Cache Strategy Picker

    Interactive code explorer showing how a service worker routes reload requests through a network-first path while serving regular navigations from cache-first — the canonical use case for isReloadNavigation.

  3. Reload Detector

    Simulates a service worker that reads isReloadNavigation to choose between network-first and stale-while-revalidate strategies. Trigger reload, navigate, and form-submit scenarios to see the decision log and the cache strategy selected for each.

  4. History State Manager

    A multi-page navigation simulator that labels each history entry as "fresh navigation", "reload" (isReloadNavigation=true), or "back/forward". A service worker intercept log shows what event.request.isReloadNavigation returns for each interaction, with a real use-case code snippet for skipping re-fetches on reload.

  5. Compatibility Lab

    Detects Request.isReloadNavigation via attribute reflection on a constructed Request object. Compares the native signal against fallback heuristics — request.cache, referrer sniffing, performance.navigation.type. Provides the complete service-worker cache-strategy pattern with fallback.

why it shipped

Service workers intercept navigation fetches, but until Chrome 147 there was no standard way to distinguish a reload from a regular navigation. Developers wanted to apply different caching strategies — network-first when the user explicitly asks for fresh content (reload), cache-first for ordinary link clicks — but they had to resort to heuristics like checking referrer, reading headers, or storing state in a global variable. Request.isReloadNavigation makes that intent explicit, removing the guesswork and enabling tighter, more predictable caching logic without any workarounds.

references