A service worker is a script that your browser runs in the background, separate from a web page, opening the door to features that don’t need a web page or user interaction. Service workers are a technology to aid developers in:
- creating realistic, reliable offline experiences
- vastly improving performance when online
- logically and dynamically caching files for any purpose
The ServiceWorker API will change the way web and mobile app developers make their websites fast and functional!
The Service Worker Cookbook was created by Mozilla with contributions from other developers. All source code is available on GitHub. This cookbook contains dozens of practical, detailed, and working examples of service worker usage. These examples are for developers from beginner to expert and illustrate a number of APIs:
- Service Worker