Every origin gets several places to keep data, and they differ in size, speed and lifetime. Cookies travel with every request, Web Storage is a small synchronous string map, IndexedDB holds structured records, the Cache API holds HTTP responses, and the origin private file system (OPFS) offers fast files. These last three share one per-origin quota (Storage Quotas), and the DevTools Application panel (Application Panel) lets you inspect and clear all of them. Listings are module scripts (top-level await) run on http://localhost in Chrome 152 1 .
| Mechanism | Capacity | API style | Lifetime | Workers |
|---|---|---|---|---|
| Cookies | About 4 KB each | Sync or async | Until expiry | Service workers |
| localStorage | 5 MiB | Sync, strings | Until cleared | No |
| sessionStorage | 5 MiB | Sync, strings | Until tab closes | No |
| IndexedDB | Shared quota | Async, any cloneable | Cleared or evicted | Yes |
| Cache API | Shared quota | Async, responses | Cleared or evicted | Yes |
| OPFS | Shared quota | Async or sync | Cleared or evicted | Yes |