The #ChromeDevSummit site is live, happening Nov 12-13 in San Francisco, CA
Check it out for details and request an invite. We'll be diving deep into modern web tech & looking ahead to the platform's future.

Registers A Service Worker

Overview

Registering a service worker is the first step towards enabling the following progressive web app features:

  • Offline
  • Push notifications
  • Add to homescreen

See Service Workers: an Introduction to learn more.

Recommendations

Registering a service worker involves only a few lines of code, but the only reason you'd use a service worker is to implement one of the progressive web app features outlined above. Implementing those features requires more work.

For more help on caching files for offline use, see the "How to pass the audit" section of the following Lighthouse doc: URL responds with a 200 when offline.

For enabling push notifications or "add to homescreen", complete the following step-by-step tutorials and then use what you learn to implement the features in your own app:

More information

Checks if the Chrome Debugger returns a service worker version.

Feedback

Was this page helpful?