Auditing a PWA with Lighthouse
Auditing a PWA with Lighthouse
Section titled “Auditing a PWA with Lighthouse”Lighthouse is Chrome’s built-in quality tool. It runs automated checks against your page and produces a categorised, scored report. As of Lighthouse 12 (2024, shipped in Chrome DevTools around Chrome 126) the report has four categories: Performance, Accessibility, Best Practices, and SEO. The old Progressive Web App category — which listed a pass/fail for each installability criterion — was removed. Lighthouse no longer scores a PWA category at all. Installability and other PWA-specific checks now live in the DevTools Application panel instead.
Getting into the habit of checking your app early — before you wire up caching strategies or push notifications — means you catch missing pieces while the codebase is still small. Lighthouse covers performance and best practices; the Application panel covers installability.
How to run Lighthouse
Section titled “How to run Lighthouse”- Open Chrome and navigate to your app (it must be served over HTTPS or
localhost). - Open DevTools with
F12orCmd+Option+I. - Click the Lighthouse tab (you may need to click the
»overflow arrow to find it). - Under Categories, pick the categories you want — Performance, Accessibility, Best Practices, SEO.
- Click Analyze page load.
Lighthouse reloads the page, collects data, and renders a scored report per category. Note there is no Progressive Web App category to tick — it was removed in Lighthouse 12. To verify that your app is installable, use the Application panel described next.
The Application tab tour
Section titled “The Application tab tour”The Application tab in DevTools is where installability now lives. It lets you inspect the live state of your PWA at any time without reloading.
| Panel | What it shows |
|---|---|
| Manifest | The parsed manifest.webmanifest — name, icons (with previews), start_url, display, colours. A warning banner appears if required fields are missing. |
| Service Workers | Every registered SW for this origin: its script URL, status (activated and is running, waiting to activate, stopped), and a skipWaiting button to force-activate a waiting SW. |
| Storage | Cache Storage entries created by your SW; useful for verifying pre-cache lists. |
| Background Services | Logs for Background Fetch, Background Sync, Push Messaging — useful once you add those APIs. |
Open the Manifest panel first on any unfamiliar PWA. It instantly tells you whether the browser has parsed a valid manifest and which icons it found.
Installability criteria (checked in the Application panel)
Section titled “Installability criteria (checked in the Application panel)”Chrome’s install criteria are what the browser requires before it will offer to install your app. The Application → Manifest panel flags any that are unmet with an installability warning:
| Criterion | What must be true |
|---|---|
| Web app manifest | A <link rel="manifest"> tag exists and the file is reachable. |
name or short_name | At least one is present in the manifest. |
start_url | Present and responds with a 200 when fetched. |
display | Set to standalone, fullscreen, or minimal-ui. |
| Icons | At least one icon at 192 × 192 and one at 512 × 512 (or larger). Icons must declare a src, sizes, and type. |
| Service worker | A SW is registered and controls the page. |
| HTTPS | The page is on a secure origin (https:// or localhost). |
Common failures and how to fix them
Section titled “Common failures and how to fix them”| Failure message | Root cause | Fix |
|---|---|---|
No manifest detected | Missing <link rel="manifest"> or the file returns a 404. | Add <link rel="manifest" href="/manifest.webmanifest"> to <head> and make sure the file is served. |
Manifest does not contain a 192px icon | Icons array is empty or all icons are smaller than 192 px. | Add an entry with "sizes": "192x192" and another with "sizes": "512x512". |
Page controlled by a service worker fails | No SW registered, SW threw during install, or SW scope does not cover the page. | Register the SW from the root (/sw.js) and confirm the console shows no registration errors. |
Does not redirect HTTP to HTTPS | Production server is not enforcing HTTPS. | Configure your host or CDN to issue a 301 redirect from http:// to https://. |
start_url does not respond with a 200 | start_url points to a path that returns 404, or the SW does not handle that request. | Make sure start_url is a real route and the SW’s fetch handler returns something for it. |
display is not one of standalone, fullscreen, minimal-ui | "display": "browser" or field is missing. | Change to "display": "standalone". |
Try it live
Section titled “Try it live”The demo below is a minimal PWA that meets every installability criterion. Open it in StackBlitz, then open Application → Manifest inside the preview to confirm it reports no installability warnings. Run Lighthouse if you also want its Performance and Best Practices scores.