Web Storage Chooser
Compare cookies, localStorage, sessionStorage, IndexedDB, Cache API and OPFS using five questions and privacy boundaries.
web-storage-chooserLOCAL WORKSPACE
1. Configure and explore
Inputs stay in this tab; no browser persistence, page-URL encoding or network requests.
2. Results and interpretation
Choose a sample, fill the fields or explore the flow.
| Option | Tradeoffs and limits |
|---|---|
| Cookie | Small values sent with matching requests; HttpOnly protects reads, Secure requires HTTPS; SameSite/CSRF still matter. |
| localStorage | Synchronous strings across visits; script-readable, quota-bound and cleared by users. |
| sessionStorage | Synchronous strings scoped to origin and tab; not a secret vault or guaranteed logout. |
| IndexedDB | Asynchronous indexed structured data and blobs; transactions; quota and eviction vary. |
| Cache API | Request/response pairs; cache lifecycle is application-managed; never cache private responses indiscriminately. |
| OPFS | Origin-private files for file-heavy work; not user-visible files; quotas, deletion and worker sync APIs need planning. |
This quiz never reads or writes storage. Browser quotas vary; any script-readable store can be exposed by XSS.
Data / rules date: 2026-10-21 · Official source
How to use this tool
Specify server visibility, data shape, lifetime, size and sensitivity. Review eviction, deletion and XSS implications before choosing a store.
When not to use it
This quiz never reads or writes storage. Browser quotas vary; any script-readable store can be exposed by XSS.
Read the guide →