Make your website work without an internet connection by configuring Workbox to cache the files users need.
Speed up repeat visits to your web app by serving previously downloaded assets from a local cache instead of the network.
Queue form submissions made while offline and automatically sync them to the server when the connection returns.
Requires integrating with a build tool like webpack, setup documentation lives on an external Google Developers site.
Workbox is a set of JavaScript libraries created by the Google Chrome team to help developers build Progressive Web Apps, which are websites that behave more like native mobile apps. A Progressive Web App can work without an internet connection, load quickly on slow networks, and in some cases be installed directly on a phone's home screen without going through an app store. The core of what Workbox does is manage something called a service worker. A service worker is a small script that runs in the background of a browser, separate from the main webpage. It intercepts network requests and can serve locally stored versions of files when the network is unavailable or slow. Writing service worker logic from scratch is complicated and error-prone, so Workbox provides ready-made building blocks that handle the most common patterns without requiring deep browser internals knowledge. Practically, this means a developer can configure which files get stored locally on a visitor's device (called precaching), set rules for when to fetch fresh data from the server versus serve from a local cache, and handle scenarios like form submissions that were attempted while the user was offline. Workbox supports popular build tools like webpack, so it can slot into an existing project without a complete rebuild. The library is distributed through npm, the standard JavaScript package registry, and maintained openly on GitHub by a team at Google. It grew out of two earlier Google projects and consolidates their functionality into a single, more modular toolkit. The README for this repository is brief, pointing primarily to external documentation on the Google Developers site for setup guides, usage instructions, and contribution details.
← googlechrome on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.