Chrome Dev Summit 2020 is back & going virtual on December 9-10. Learn more

Service Worker Packages

Below is the list of service worker packages that Workbox provides. Each packages serves a specific need and can be used together or on its own.
Use background sync to reliably make a network request even if the user is offline.
Send messages to pages (via Broadcast Channels) when a cache is updated with a new response.
Restrict which requests are cached based on a response's status code or headers.
Alter log levels and change cache names via workbox-core. Contains shared code used by all Workbox libraries.
Removed cached requests based on the number of items in a cache or the age of the cached request.
See how users are interacting with your site when they are offline.
Enable navigation preload, to get a network response for navigation requests faster.
Easily precache a set of files and efficiently manage updates to files.
This modules provides support for responding to a Range: request using a slice of previously cached data.
Easily use common workbox patterns without needing to set them up yourself from individual packages.
Routes requests in your service worker to specific caching strategies or callback functions.
A set of runtime caching strategies that will handle responding to a request, normally used with workbox-routing.
This modules provides support for composing a response from a series of streaming sources.

Window Packages

Workbox provides modules that run in the window context and complement the service worker packages.
A module that helps with registering a service worker, managing updates, and responding to lifecycle events.

Node Modules

Workbox provides a set of Node modules that make it easy to generate a list of files to precache in your service worker or create a complete service worker that you can use without writing any code.
Generate a complete service worker, inject a precache manifest or copy the Workbox files from the command line.
An npm module that can generate a complete service worker, inject a precache manifest and copy the Workbox files.
As part of your Webpack build process add Workbox and precache assets.

Loader (CDN)

Workbox provides a way to load its service worker packages from a CDN (or custom endpoint). This makes it easy to get started with Workbox without having to set up a build process.
Manages dynamic loading of Workbox service worker packages as needed and provides additional helper methods.