Workbox Examples

This page contains examples for some of the Workbox modules.

Workbox is a set of small modules that can be used on their own, but we’ve also combined the most common pieces into one module, workbox-sw. This module supports precaching, routing of fetch events, runtime caching and more.

Example of workbox-sw

The workbox-sw example demonstrates a complete service worker implementation, demonstrating the common parts of the API. It’s an in-depth exploration of everything you’d need to build a production-ready service worker.

View Example

Lower Level Modules

As an alternative to using the full workbox-sw library, you can use these smaller, standalone modules in your service worker.