@@ -98,14 +98,25 @@ installation, `event.addRoutes()` can declare conditions based on URL, request
9898method, mode, destination, or Worker state, then choose the network, a cache,
9999the fetch handler, or a race between network and handler.
100100
101- For requests that can go straight to the network or a named cache, the browser
102- can avoid starting the Worker and dispatching a ` fetch ` event. That removes
103- bootstrap and JavaScript work from routes whose behaviour is already known.
104- Start with a small, measurable route set, retain the ordinary fetch path for
105- unsupported browsers, and compare cold navigations as well as warm ones; a
101+ [ MDN’s compatibility data] ( https://github.com/mdn/browser-compat-data/blob/v8.1.4/api/InstallEvent.json )
102+ records support from Chrome and Edge 123 and Safari 27, including Safari on
103+ iOS; Firefox remains unsupported. Feature-detect ` addRoutes ` on the install
104+ event and retain the ordinary fetch handler for Firefox and older browsers.
105+
106+ Network and cache routes can avoid Worker startup and ` fetch ` dispatch. Start
107+ with a small, measurable route set and compare cold and warm navigations; a
106108[ PWA performance review] ( /performance-audits/ ) should prove that the declared
107109route matches the application’s real caching and offline requirements.
108110
111+ There’s also a registration gotcha: ` fetch-event ` and
112+ ` race-network-and-fetch-handler ` both require a registered ` fetch ` listener,
113+ otherwise ` addRoutes() ` rejects with a ` TypeError ` . Handle rejection and test
114+ the fallback. The API extends installation automatically, but its internal
115+ lifetime promise stays fulfilled; rejection alone doesn’t fail installation.
116+ Passing the rejected promise to ` event.waitUntil() ` does, so decide whether
117+ static routes are required or optional. [ OpenPWA’s static-routing reference] ( https://openpwa.net/reference/service-worker/static-routing/ )
118+ has practical examples and Chromium’s diagnostic messages.
119+
109120## Chrome DevTools Makes Comparisons More Reproducible
110121
111122[ Chrome DevTools’ latest release
0 commit comments