Definition
Precaching
Precaching means fetching and storing a known list of build-time assets (HTML shell, CSS, JS bundles, key icons) in Cache Storage inside the install event handler, so they are guaranteed to be available offline from the very first load rather than being cached only after a user happens to request them.
A basic manual example: event.waitUntil(caches.open("shell-v3").then((cache) => cache.addAll(["/", "/styles.css", "/main.js"])));. If any single URL in the list 404s, the entire addAll() call rejects and the install fails, which is a deliberate safety mechanism so a broken precache list never gets partially committed.
Precache lists are almost always generated at build time rather than hand-written, since they need to include hashed filenames like /main.a1b2c3.js that change on every deploy — Workbox's workbox-build and workbox-webpack-plugin generate this list automatically from your build output.
Precaching trades a slightly longer or more bandwidth-heavy install step for guaranteed offline availability of the app shell; it is distinct from runtime caching, which only stores a response after the user actually triggers the matching request.
Because precached entries are keyed to a specific build's cache name (e.g. "shell-v3"), each deploy should use a new cache name and clean up the old one in the activate event to avoid unbounded storage growth.