# Lighthouse and the removed PWA category

> What Lighthouse audits, why Lighthouse 12.0 in Chrome 126 removed the PWA category after Chrome changed its installability criteria, and what to use instead.

Lighthouse is Chrome's open-source audit tool, run from DevTools, the command line, a Node
module, or PageSpeed Insights, scoring a URL on Performance, Accessibility, Best Practices, and
SEO. It no longer has a PWA category: Lighthouse 12.0, shipped in Chrome 126 in May 2024,
removed it because its checks mirrored Chrome's installability criteria, which Chrome had
already loosened, so the category stopped measuring anything a browser enforced.

## How it works

Lighthouse loads the page in a controlled Chrome instance, applies simulated throttling, and
runs audits grouped into categories; each category score is a weighted sum of its audits
([Lighthouse overview](https://developer.chrome.com/docs/lighthouse/overview),
developer.chrome.com). The DevTools panel runs the version bundled with that Chrome; the CLI
and Node module need a local Chrome and let CI pin a version.

### Why the PWA category went

The PWA audits (installable manifest, service worker with a `fetch` handler, splash screen,
themed address bar, offline start URL) were a restatement of Chrome's install prompt
requirements. Chrome removed the `fetch`-handler requirement for menu installs in version 108
on Android and 112 on desktop ([Update on the installability criteria](https://developer.chrome.com/blog/update-install-criteria),
developer.chrome.com), at which point the audits were checking a rule the browser no longer
applied. The Lighthouse team tracked the removal in issue 15535 and shipped it in 12.0:
the category, its gatherers for the manifest and service worker, and the `pwa` key in the JSON
output are gone ([Remove PWA Category](https://github.com/GoogleChrome/lighthouse/issues/15535),
github.com). PageSpeed Insights and its API switched to 12.0 on 2024-05-10 with the same
breaking change.

### What replaces it

Installability is checked at runtime by the browser, and the signals are observable directly:
the `beforeinstallprompt` event in Chromium, the **Manifest** pane in DevTools with its
installability errors, and the browser's own install menu item. Offline capability is tested by
ticking **Offline** in the Application > Service workers pane and reloading. None of these
produce a score, which is the point: a PWA either installs on the platform in question or it
does not.

### Platforms it runs on

The DevTools panel exists in Chrome and other Chromium browsers, and the CLI and Node module
drive a local Chrome through the DevTools Protocol, so Lighthouse audits a page as Chrome sees
it; there is no Firefox or Safari run. PageSpeed Insights runs the same engine on Google's
servers and adds CrUX field data when the origin has enough traffic.

### What the remaining categories say about a PWA

Performance measures the lab load, which for a PWA on a repeat visit is mostly the service
worker's cache strategy; Lighthouse runs with a cold profile, so it reports first-visit numbers
unless configured with a warm run. Best Practices includes HTTPS, which service workers need.
Accessibility and SEO are unaffected by installation.

## Examples

One example pins the tool in CI; the other replaces the audit the tool no longer runs.

### Running the CLI with a pinned version in CI

Pin the package so a Lighthouse upgrade (which changes scoring) does not fail a build on its
own. The JSON output no longer has a `categories.pwa` key; scripts that read it get `undefined`.

```bash
npm install --save-dev lighthouse@12
npx lighthouse https://example.com --output=json --output-path=./report.json --only-categories=performance,best-practices
node -e "const r=require('./report.json'); console.log(r.categories.performance.score, r.categories.pwa)"
```

The last line prints a performance score between 0 and 1 and `undefined` for `pwa`, which is
the quickest way to confirm which major version a pipeline is running.

### Checking installability at runtime instead

`beforeinstallprompt` fires when Chromium judges the page installable. The handler reveals an
install control and defers the prompt to a click; its absence is not a failure, because Safari
and Firefox do not implement the event (BCD `api.Window.beforeinstallprompt_event`).

```js
let deferredPrompt = null;
const installButton = document.querySelector('#install');

if ('onbeforeinstallprompt' in window) {
  window.addEventListener('beforeinstallprompt', (event) => {
    event.preventDefault();
    deferredPrompt = event;
    installButton.hidden = false;
  });
  installButton.addEventListener('click', async () => {
    await deferredPrompt?.prompt();
    deferredPrompt = null;
    installButton.hidden = true;
  });
} else {
  installButton.hidden = true; // no event in this engine: the browser offers its own install UI
}
```

Hiding the button by default keeps Firefox and Safari users from seeing a control that does
nothing; see [install prompt](/reference/installation/install-prompt/) for the full flow.

:::observed
Chrome DevTools, Lighthouse panel, in Chrome 126 and later lists four category checkboxes,
**Performance**, **Accessibility**, **Best practices**, and **SEO**, where Chrome 125 also showed
**Progressive Web App**; the panel's footer reports the bundled version as `Lighthouse 12.0.0`
([What's New in DevTools (Chrome 126)](https://developer.chrome.com/blog/new-in-devtools-126),
developer.chrome.com). The JSON report from the 12.x CLI has four keys under `categories`,
`performance`, `accessibility`, `best-practices`, and `seo`, and `categories.pwa` reads as
`undefined`, which is the breaking change PageSpeed Insights announced for its 2024-05-10
switch to 12.0.
:::

## See also

- [Lighthouse overview](https://developer.chrome.com/docs/lighthouse/overview) (developer.chrome.com)
- [Update on the installability criteria](https://developer.chrome.com/blog/update-install-criteria) (developer.chrome.com)
- [Remove PWA Category (GoogleChrome/lighthouse issue 15535)](https://github.com/GoogleChrome/lighthouse/issues/15535) (github.com)
- [Installability criteria](/reference/installation/installability-criteria/)
- [Install prompt](/reference/installation/install-prompt/)
- [Core Web Vitals (LCP, INP, and CLS)](/reference/performance/core-web-vitals/)