Test a PWA
Published Updated
Chrome DevTools lets you check why a page is installable, control a service worker through install and waiting, then activation. You can simulate offline without disconnecting the machine and confirm installation on a real Android device. Use the Application panel for most of these checks, with the Console drawer for install and lifecycle messages. Lighthouse’s PWA category is deprecated, so a release check needs direct installability and offline checks. It also needs lifecycle and device checks instead of a PWA badge.
You need the app served over HTTPS or localhost and Chrome with DevTools. For the last
step, you also need an Android phone with USB debugging enabled. The controls use the English DevTools
labels.
Start the release checklist with web.dev’s Core Progressive Web App checklist. It calls for fast startup, cross-browser operation, responsive content, a custom offline page, and installability. Use DevTools to inspect the install and offline mechanisms, then run the app’s user tasks in the browsers and viewport sizes that the release supports. Repeat them in each supported network state.
Where it is supported
Section titled “Where it is supported”These DevTools steps use Chrome. Chrome’s remote-debugging guide documents Windows and macOS desktop hosts, as well as Linux hosts, connected to Chrome on Android. Device Mode does not reproduce the mobile installation flow.
The registration check uses the Service Worker API. The compatibility dataset records support
from Chrome 40 and Edge 17. Firefox support starts at 44 and macOS Safari support at 11.1.
Support starts with Safari 11.3 on iOS and Samsung Internet 4.0. Android WebView supports it
from version 40 (BCD api.ServiceWorker).
1. Inspect the manifest and installability result
Section titled “1. Inspect the manifest and installability result”Open DevTools, select Application, then Manifest. The Identity and Presentation sections show the manifest fields in readable form, Icons lists each declared icon (the Show only the minimum safe area for maskable icons checkbox previews the cropped safe area), and Shortcut #N and Screenshot #N sections follow. When an icon fails to load or a required field is missing, an Installability section appears with the reason. Keep the Console drawer open while you click the address bar’s Install button: it logs manifest problems and the install lifecycle.
Use this manifest as a fixture for checking the fields and icons that DevTools displays:
{ "name": "Example PWA", "short_name": "Example", "start_url": "/", "scope": "/", "display": "standalone", "icons": [ { "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" } ]}The file alone is not a pass result. Read the Installability section and trigger the
installation flow with the Console drawer open. Chrome removed the service worker
fetch-handler requirement for installation from the menu in Chrome 108 on mobile and
Chrome 112 on desktop. Chrome’s install prompt algorithm still checks for a fetch handler.
The versioned criteria and the manifest fields Chrome recommends are recorded in
Installability criteria: what makes a PWA installable.
2. Exercise the worker and offline path
Section titled “2. Exercise the worker and offline path”Application > Service workers lists the registration for the open page with its Source and Status lines as well as Clients. Use its controls to test the worker:
- Offline puts DevTools into offline mode, the same as the Network panel’s Offline throttling preset. Reload with it checked to see what the worker serves without a network.
- Update on reload forces a service worker update on each page load. Use it while you edit
sw.js, then turn it off before testing the normal update lifecycle. - Bypass for network sends requests straight to the network, which tells you whether a bug lives in the worker or in the page.
- Push emulates a push notification without a payload, and Sync emulates a background sync event.
- stop halts the running worker; the next event starts it with fresh global state, which surfaces code that assumed in-memory variables survive.
- Unregister removes the registration; Update performs a one-time update check.
For a repeatable offline check, load the route once, select Offline, and reload the same URL. Record the application response you expect when the network is unavailable. If the route shows Chrome’s offline page instead, clear Offline, inspect the worker’s error count beside Source, and open that link to read the logged errors in Console. Then select Bypass for network and reload. A response that works with bypass enabled isolates the failing path to the service worker or its caches because Chrome sends those requests to the network.
The Update Cycle table shows elapsed times for worker activities such as install and wait followed by activate; the Expand buttons reveal exact timestamps.
3. Record the registration state
Section titled “3. Record the registration state”Paste the function into Console on the route under test. It checks for
navigator.serviceWorker, then handles the undefined result that getRegistration() returns
when no registration matches the current client URL.
async function serviceWorkerState() { if (!('serviceWorker' in navigator)) { return { ok: false, reason: 'Service workers are not supported in this browser.' }; } const registration = await navigator.serviceWorker.getRegistration(); if (!registration) { return { ok: false, reason: 'No service worker is registered for this page yet.' }; } const worker = registration.active || registration.waiting || registration.installing; return { ok: true, state: worker ? worker.state : 'unknown', scope: registration.scope };}Run the whole function so the failure branch remains visible. With no matching registration, the command returns the fallback object. This is illustrative output:
await serviceWorkerState()// { ok: false, reason: 'No service worker is registered for this page yet.' }After registration and activation, (await serviceWorkerState()).state returns activated.
During the lifecycle, the same property can return installing or installed; it can also
return activating.
MDN’s ServiceWorker.state reference defines those values. The returned scope comes from the
matching registration. When ok is true, the helper looked for .active first, followed by
.waiting. If neither existed, it looked for .installing, then returned that worker’s
.state as state.
If a test runner imports JavaScript modules instead of using Console, export the same helper:
export async function serviceWorkerState() { if (!('serviceWorker' in navigator)) { return { ok: false, reason: 'Service workers are not supported in this browser.' }; } const registration = await navigator.serviceWorker.getRegistration(); if (!registration) { return { ok: false, reason: 'No service worker is registered for this page yet.' }; } const worker = registration.active || registration.waiting || registration.installing; return { ok: true, state: worker ? worker.state : 'unknown', scope: registration.scope };}Import that function in the test module and assert on the returned object. Do not paste the exported form into Console.
4. Install on a real phone over remote debugging
Section titled “4. Install on a real phone over remote debugging”Chrome’s PWA debugging guide says Device Mode cannot simulate the mobile installation workflow.
Connect an Android phone over USB and enable USB debugging. On the desktop, open
chrome://inspect#devices. Enable Discover USB devices and select the page, then attach
DevTools. In Chrome on the phone, open the menu. Choose Install app (or Add to Home
screen on some devices).
The expected result is the installation flow on the connected device, while the attached
DevTools instance lets you inspect that live page. Chrome’s remote debugging guide documents
device discovery and inspection from Windows and macOS, as well as Linux.
Correction (2026-11-13)
Section titled “Correction (2026-11-13)”Before the 2026-11-13 correction, Push was described as sending a typed payload, and Update on reload as reinstalling a byte-identical worker and skipping its waiting phase. Chrome’s documentation says that Push emulates a push notification without a payload and Update on reload forces a service worker update on each page load.
Correction (2026-11-19)
Section titled “Correction (2026-11-19)”The earlier manifest example was introduced as a minimum passing manifest even though Chrome’s
menu-install criteria no longer require a service worker fetch handler from Chrome 108 on
mobile and Chrome 112 on desktop. It is now a test fixture, and the instructions use DevTools’
Installability result as the check. The Console example also dropped export so it can be
pasted directly into DevTools.
See also
Section titled “See also”- Service workers: what they are, and a minimal one
- Debugging service workers
- Debug a PWA
- Installability criteria: what makes a PWA installable
- Debug Progressive Web Apps (developer.chrome.com)
- Remote debug Android devices (developer.chrome.com)
- The service worker lifecycle (web.dev)
- What makes a good Progressive Web App? (web.dev)
- Revisiting Chrome’s installability criteria (developer.chrome.com)
- ServiceWorkerContainer: getRegistration() method (developer.mozilla.org)
- ServiceWorker: state property (developer.mozilla.org)
← Back to the Guides overview.