# googlechrome/workbox

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/googlechrome-workbox).**

12,895 stars · 867 forks · JavaScript · mit

## Links

- GitHub: https://github.com/GoogleChrome/workbox
- Homepage: https://developers.google.com/web/tools/workbox/
- awesome-repositories: https://awesome-repositories.com/repository/googlechrome-workbox.md

## Topics

`offline-first` `progressive-web-app` `service-worker` `service-workers` `sw-precache` `sw-toolbox`

## Description

Workbox is a modular library and toolkit designed for managing service workers in progressive web applications. It provides a comprehensive framework for handling asset caching, request routing, and background script lifecycle management, enabling developers to build web applications that function reliably offline and load efficiently.

The project distinguishes itself through a declarative routing engine and a plugin-based architecture that allows for the injection of custom logic into the request and response processing pipeline. It supports advanced caching patterns, such as cache-first or network-first strategies, and includes specialized capabilities for media streaming, navigation preloading, and the synchronization of offline requests.

Beyond core caching, the toolkit offers extensive utilities for monitoring and observability, including cache inspection, diagnostic logging, and network simulation. It also provides build-time integration tools to automate the generation of service worker files and the management of precache manifests, ensuring consistent application versioning and state coordination between the main application thread and background workers.

## Tags

### Data & Databases

- [Web Asset Caches](https://awesome-repositories.com/f/data-databases/dataset-management-tools/in-memory-caching/asset-caching/web-asset-caches.md) — Downloads and stores essential files during installation to ensure the application shell is available for immediate offline access. ([source](https://developer.chrome.com/docs/workbox/app-shell-model))

### Web Development

- [Service Worker Libraries](https://awesome-repositories.com/f/web-development/browser-integration-utilities/browser-infrastructure/service-worker-controls/service-worker-libraries.md) — Provides a collection of modular libraries for implementing service worker caching, routing, and offline support.
- [Progressive Web App Utilities](https://awesome-repositories.com/f/web-development/progressive-web-app-utilities.md) — Provides a comprehensive toolkit for building reliable, offline-capable web applications through service worker management.
- [Request Routing](https://awesome-repositories.com/f/web-development/request-routing.md) — Service Worker directs incoming requests to specific caching strategies or custom callback functions to determine how the application handles data fetching. ([source](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime))
- [Web Asset Caching Frameworks](https://awesome-repositories.com/f/web-development/frontend-development-tools/web-asset-management-tools/web-asset-caching-frameworks.md) — Implements a declarative system for defining request handling strategies and managing the lifecycle of cached assets.
- [Caching Strategy Handlers](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/caching-strategy-handlers.md) — Executes modular caching patterns like cache-first or network-first to determine how individual network requests are resolved and fulfilled.
- [Service Worker Generators](https://awesome-repositories.com/f/web-development/browser-integration-utilities/browser-infrastructure/service-worker-controls/service-worker-libraries/service-worker-generators.md) — Creates worker files and injects precache manifests into build pipelines to simplify the integration of offline capabilities. ([source](https://developer.chrome.com/docs/workbox/modules))
- [Offline Request Handlers](https://awesome-repositories.com/f/web-development/request-handling/offline-request-handlers.md) — Configures a dedicated page to be served when a user attempts to navigate to a resource while offline. ([source](https://developer.chrome.com/docs/workbox/precaching-dos-and-donts))
- [Request Lifecycle Hooks](https://awesome-repositories.com/f/web-development/request-lifecycle-hooks.md) — Allows the injection of custom logic into the request and response processing pipeline to modify or monitor network operations.
- [Resource Preloading](https://awesome-repositories.com/f/web-development/resource-preloading.md) — Activates browser-level navigation preloading to reduce latency for network-first requests by fetching resources in parallel. ([source](https://developer.chrome.com/docs/workbox/navigation-preload))
- [Update Triggers](https://awesome-repositories.com/f/web-development/browser-integration-utilities/browser-infrastructure/service-worker-controls/service-worker-libraries/service-worker-generators/update-triggers.md) — Service Worker forces a check for new background script versions to ensure long-lived user sessions receive the latest application logic immediately. ([source](https://developer.chrome.com/docs/workbox/service-worker-lifecycle))
- [Service Worker Logic Extenders](https://awesome-repositories.com/f/web-development/browser-integration-utilities/browser-infrastructure/service-worker-controls/service-worker-logic-extenders.md) — Injects custom logic into request and response handling cycles to modify, validate, or monitor network and cache operations. ([source](https://developer.chrome.com/docs/workbox/using-plugins))
- [Cacheable Response Filters](https://awesome-repositories.com/f/web-development/response-validation/cacheable-response-filters.md) — Filters and forces the storage of specific network responses, including opaque ones, to ensure only valid and useful data enters the cache. ([source](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime))

### Repository Format

- [Awesome List](https://awesome-repositories.com/f/repository-format/awesome-list.md) — A community-curated directory that catalogs and links out to other open-source projects, rather than a standalone tool you run yourself.

### Software Engineering & Architecture

- [Background Sync Queues](https://awesome-repositories.com/f/software-engineering-architecture/request-queuing/background-sync-queues.md) — Persists failed network requests in local storage to automatically retry them once the browser detects a restored internet connection.
- [Navigation Accelerators](https://awesome-repositories.com/f/software-engineering-architecture/performance-reliability/performance-optimization/frontend-rendering-loading/page-navigation-prefetching/navigation-acceleration/navigation-accelerators.md) — Accelerates page loads by preloading navigation requests and streaming content to render pages almost instantaneously. ([source](https://developer.chrome.com/docs/workbox/))
- [Plugin Architectures](https://awesome-repositories.com/f/software-engineering-architecture/plugin-architectures.md) — Injects custom logic into the request and response lifecycle through a plugin architecture to modify application behavior. ([source](https://developer.chrome.com/docs/workbox/))

### System Administration & Monitoring

- [Fetch Event Interceptors](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/traffic-interception-modification/service-worker-request-routing/fetch-event-interceptors.md) — Intercepts browser fetch events to delegate network requests to programmable caching and routing logic.
- [Offline Request Queues](https://awesome-repositories.com/f/system-administration-monitoring/background-job-queues/offline-request-queues.md) — Persists failed network requests in local storage to automatically retry them once the browser detects a restored internet connection.
- [Service Worker Lifecycle Managers](https://awesome-repositories.com/f/system-administration-monitoring/service-lifecycle-management/service-worker-lifecycle-managers.md) — Service Worker manages the registration, activation, and update lifecycle of background scripts to ensure users receive the latest application version and consistent background execution. ([source](https://developer.chrome.com/docs/workbox/service-worker-lifecycle))

### Development Tools & Productivity

- [Service Worker Manifests](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/asset-file-management/asset-processing-pipelines/asset-transformation-pipelines/asset-manifest-generators/service-worker-manifests.md) — Uses build-time generated lists of assets to download and store critical files during the service worker installation phase.

### Networking & Communication

- [Request Routing](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-routing-traffic-management/request-routing.md) — Matches incoming network requests against registered patterns to assign specific handling strategies or custom callback functions automatically.
- [Cross-Window Messaging](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/cross-window-messaging.md) — Facilitates communication between the window and worker contexts by providing a structured messaging interface. ([source](https://developer.chrome.com/docs/workbox/using-workbox-window))
- [Window-Worker Bridges](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/cross-window-messaging/window-worker-bridges.md) — Facilitates structured communication between the main application thread and background scripts to coordinate state and lifecycle events.
- [Partial Response Streams](https://awesome-repositories.com/f/networking-communication/response-streaming-utilities/partial-response-streams.md) — Serves specific slices of cached data in response to range requests to efficiently handle media streaming or large file downloads. ([source](https://developer.chrome.com/docs/workbox/modules))

### DevOps & Infrastructure

- [Dynamic Cache Controllers](https://awesome-repositories.com/f/devops-infrastructure/cache-management/dynamic-cache-controllers.md) — Accesses and manipulates browser cache storage directly from the main application thread to update user interfaces or prefetch assets. ([source](https://developer.chrome.com/docs/workbox/access-caches-from-the-window))
- [Worker Context Bridges](https://awesome-repositories.com/f/devops-infrastructure/worker-context-access/worker-context-bridges.md) — Exposes cache instances and communication channels to the window context to coordinate state between the main thread and background workers. ([source](https://developer.chrome.com/docs/workbox/))

### Graphics & Multimedia

- [Media Streaming](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming.md) — Provides specialized logic for handling partial content requests and range headers to enable predictable media playback from local cache.
