What is Service Worker Inspector
The Service Worker Inspector queries the browser's Service Worker registry and displays all currently registered service workers along with their scope URLs and lifecycle states. Service Workers are background scripts that enable push notifications, offline caching, and background sync for web applications. The tool calls navigator.serviceWorker.getRegistrations() and renders each registration's active, installing, and waiting Worker states. This is essential for debugging Progressive Web Apps (PWAs) where a stale or incorrectly scoped service worker can cause caching issues, broken offline modes, or unexpected content updates.
How to Use Service Worker Inspector
- Step 1: Navigate to the Service Worker Inspector page. The page shows a test button and an output area.
- Step 2: Click the **Test API** button. The tool queries the browser's service worker registry.
- Step 3: If service workers are registered, the output lists each one with its scope URL, active state, installing state, and waiting state.
- Step 4: If no service workers are registered, the output shows 'No service workers registered.'
- Step 5: If the Service Worker API is not available (e.g., insecure context), the output indicates the API is not supported.
Why Use Service Worker Inspector
When a PWA misbehaves — serving stale cached content, failing to update, or throwing offline errors — the first diagnostic step is checking which service workers are active and what scope they cover. The Service Worker Inspector gives this visibility instantly without opening browser DevTools. Developers can verify that their service worker registered with the correct scope, confirm it is in the 'activated' state, and detect if multiple workers are competing for the same scope. QA teams use it during regression testing to ensure new deployments don't leave orphaned service workers behind.
Privacy & Security
This tool runs entirely in your browser — no data ever leaves your device. There is no server round-trip, no upload, no logging, and no account required. Your input is processed locally using client-side JavaScript and is never stored, transmitted, or accessible to anyone else. When you close the tab, everything disappears.
Frequently Asked Questions
Why does it say 'no service workers registered' even though I have a PWA?
<p>Service workers are scoped to their registration origin and path. If the current page is served from a different origin or path than where the service worker was registered, it will not appear in the list. Also, service workers are per-origin, so a service worker registered on https://example.com will not show up when inspecting from https://app.example.com.</p>Can I unregister service workers from this tool?
<p>The current version is read-only — it inspects the registry without modifying it. To unregister a service worker, use your browser's DevTools Application panel or call navigator.serviceWorker.getRegistrations() in the console.</p>What do the 'active', 'installing', and 'waiting' states mean?
<p>Installing means the service worker script is being fetched and its install event has not yet fired. Waiting means installation is complete but the new worker is not yet controlling the page (usually because an older worker is still active). Active means the service worker is installed and actively handling fetch and other events for its scope.</p>