Skip to content We're live on Product Hunt today Upvote
install

diagnostic · one of 36 free, no counter

Service worker

Why is this still serving the old version, and why will it not install as an app?

A registration has three slots and only one of them is the worker doing the serving. The state that costs people an afternoon is the second: a new worker that installed correctly, cannot activate while any tab on the origin is still controlled by the old one, and therefore sits in waiting while the site carries on serving the previous version - which from the page is indistinguishable from a deploy that did not happen. All three slots are read separately, and beside them the manifest is fetched and measured against what a browser wants before it offers to install anything.

Reach it Press + K on any tab and type service worker. Ctrl + K on Windows and Linux

Every service worker on the origin, and whether the app can install
reads the registrations for this origin
fetches the manifest, same-origin only
writes nothing - no register, update or unregister
sends nothing
permission none beyond activeTab
unknowns named, never guessed
plan free
section#about

What this actually is

A deploy that is live on the server and not in the browser, a page that behaves as though it is offline when it is not, or an install prompt that never appears and gives no reason. Also the quieter one: a registration that is active and controlling nothing, because the page loaded before the worker took over and nothing called clients.claim().

section#reference

The three slots, and what each one means

installing
The script has been fetched and its install event is running. A worker that stays here is failing to install - usually a cache.addAll on a URL that 404s, which rejects the whole install with no visible symptom.
waiting
Installed and refused activation, because this document is still controlled by the previous worker. This is the state that looks like nothing is wrong. It clears when every tab on the origin closes, or when the worker calls skipWaiting().
active
The worker that may serve requests. Not the same as controlling this page: a page loaded before its worker took over is served entirely by the network until it is reloaded, however healthy the registration looks.
a fetch handler
Reported as unknown, and deliberately not guessed. Whether a worker handles fetch decides whether an install is offered, and it cannot be read from outside the worker - a regular expression over a bundled script is not evidence, and this is exactly the case where a wrong answer sends somebody looking in the wrong place.
section#asked

Asked about this diagnostic

Why does my new service worker not take over?

Because a worker cannot activate while any tab on the origin is still controlled by the previous one, so it waits. The panel names that state directly rather than leaving it to be inferred from a registration that looks healthy. Closing every tab on the site or calling skipWaiting() releases it.

The registration says active, so why is nothing being served by it?

Active and controlling are different facts and both are reported. A page that loaded before the worker took over is controlled by nothing until it is reloaded, unless the worker called clients.claim().

Why will the browser not offer to install this site?

The list checks the criteria that are readable from the page: a secure context, a manifest that fetches and parses, a name, a start_url, a display mode that leaves the tab, and an icon large enough. Each answers on its own, so a failing manifest reads as a missing file rather than as six missing fields.

Can it unregister a worker or force an update?

No, and that is on purpose for now. Every call here is a read. Unregistering changes what the site serves its own visitors, which is a different kind of act from looking at it, and it belongs behind the same confirmation the site-data clear uses rather than beside a report that runs on arrival.

Does it fetch a manifest declared on another origin?

No. It is named as cross-origin instead. That request needs CORS headers a site has no reason to have set, and the refusal that comes back is indistinguishable from a missing file - so reporting it as failed would be a guess presented as a reading.

how to use service worker

  1. Open Service worker on the origin that is still serving the old build.
  2. Read all three slots. The worker that is serving is not always the one you deployed.
  3. A worker stuck in waiting cannot activate while any tab on the origin is still controlled.
  4. Read the manifest section for why an install prompt never appeared.