Service workers static routingLimited availability
The service worker install event's addRoutes method declares resource paths that should either be fetched from the network or the cache, to bypass the service worker and improve performance.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–122Not supported
123+Supportedsince Mar 19, 2024
Current: 155Edge
12–122Not supported
123+Supportedsince Mar 22, 2024
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27MobileChrome Android
18–122Not supported
123+Supportedsince Mar 19, 2024
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27How to use
Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: InstallEvent.
Feature detection
JS · check before using
if ("InstallEvent" in globalThis && "addRoutes" in InstallEvent.prototype) {
// InstallEvent.addRoutes is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (3). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| InstallEvent | 40 | 17 | ✕ | 27 | 40 | ✕ | 27 |
| InstallEvent.InstallEvent | 40 | 79 | ✕ | 27 | 40 | ✕ | 27 |
| InstallEvent.addRoutes | 123 | 123 | ✕ | 27 | 123 | ✕ | 27 |