Service Worker Libraries
Below is the list of service worker libraries that Workbox provides. Each library serves a specific need and can be used together or on its own.
workbox
Manages loading modules as needed & provides helper methods.
workbox.core
Alter log levels and change cache names via
workbox.core
. Contains shared code used by all Workbox libraries.
workbox.precaching
Easily precache a set of files and efficiently manage updates to files.
workbox.routing
Routes requests in your service worker to specific caching strategies or callback functions.
workbox.strategies
A set of runtime caching strategies that will handle responding to a request, normally used with
workbox.routing
.
workbox.expiration
Removed cached requests based on the number of items in a cache or the age of the cached request.
workbox.backgroundSync
Use background sync to reliably make a network request even if the user if offline.
workbox.googleAnalytics
See how users are interacting with your site when they are offline.
workbox.cacheableResponse
Restrict which requests are cached based on a response's status code or headers.
workbox.broadcastUpdate
Send messages to pages (via Broadcast Channels) when a cache is updated with a new response.
workbox.rangeRequest
This modules provides support for responding to a
Range:
request using a slice of previously cached data.
workbox.streams
This modules provides support for composing a response from a series of streaming sources.
workbox.navigationPreload
Enable navigation preload, to get a network response for navigation requests faster.
Window Modules
Workbox provides modules that run in the window context and complement the service worker modules.
workbox-window
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.
Workbox CLI
Generate a complete service worker, inject a precache manifest or copy the Workbox files from the command line.
workbox-build
An npm module that can generate a complete service worker, inject a precache manifest and copy the Workbox files.
workbox-webpack-plugin
As part of your Webpack build process add Workbox and precache assets.