Service Worker Introduction

Step-by-step introduction to the Service Worker API.

What's a service worker?

A service worker is a script which runs in the background of a browser and can:

The service worker only needs a web page to be created. Because it runs in the background (worker context) it has no access to the document.

Code snippets

All code snippets are written in ES6 for brevity, but should be transpiled to or written in ES5 for proper browser support.

Resources