Does not register a service worker that controls page and start_url

Registering a service worker is the first step towards enabling key Progressive Web App (PWA) features:

  • Works offline
  • Supports push notifications
  • Can be installed to the device

Learn more in the Service workers and the Cache Storage API post.

Browser compatibility

All major browsers support service workers. See Browser compatibility.

How the Lighthouse service worker audit fails

Lighthouse flags pages that don't register a service worker:

Lighthouse audit showing site doesn't register a service worker

Lighthouse checks if the Chrome Remote Debugging Protocol returns a service worker version. If it doesn't, the audit fails.

How to register a service worker

Registering a service worker involves only a few lines of code, but the only reason you'd use a service worker is to make it possible to implement one of the PWA features outlined above. Actually implementing those features requires more work:

Resources