- Works offline
- Supports push notifications
- Can be installed to the device
Learn more in the Service workers and the Cache Storage API post.
How the Lighthouse service worker audit fails
Lighthouse flags pages that don'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.
Each PWA audit is weighted equally in the Lighthouse PWA Score, except for three manual audits: Site works cross-browser, Page transitions don't feel like they block on the network, and Each page has a URL. Learn more in the Lighthouse Scoring Guide.
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:
- To learn how to cache files for offline use, see the What is network reliability and how do you measure it? post.
- To learn how to make your app installable, see the Make it installable codelab.
- To learn how to enable push notifications, see Google's Adding Push Notifications to a Web App.