Reference
Shared vocabulary for this workspace. Lessons stick to these meanings.
caches)caches object. Methods include
open, keys, delete,
has, and match (search across caches).
Cache object opened with a string name (e.g.
static-v3). An origin may have many named caches; naming
is how you version and delete whole generations of assets.
Request key and a Response value (body +
headers/status). Any data that can travel over HTTP can sit in the
body — but the model is still “this is a network resource,”
not “this is a row in my app database.”
Cache-Control, validators, heuristics). Separate from
Cache Storage. Service-worker / Cache API caching is
code-driven; the two layers interact and can fight if
you ignore each other.
fetch events for an
origin’s controlled pages. The most common place Cache Storage is used
for offline shells and runtime strategies — but the Cache API itself
also works from the page and other workers.
localStorage / sessionStorage: synchronous
string maps with small practical limits. Wrong tool for bulk assets or
Request/Response caching.
0), typically from a no-CORS fetch. add /
addAll will not store them; put can — with
real caveats for size accounting and debugging. Treat carefully.
QuotaExceededError; browsers may also
evict best-effort data under pressure.