Cache Storage API Playground

The copies shelf: cache.put, match, keys and delete on the real Cache API. What happens to a body already read, a stale copy, and the shelves of old releases?…

Why it matters

This is what an offline PWA stands on. Its mistakes are real too: an empty reply because cache.put already read its body, stale data forever because the Cache API does not read Cache-Control, a site quota swelling because old versions’ caches are never deleted.

The key idea

The key is the Request, not an HTTP header; its lifetime is yours

Common mistakes

Try it in this playground