Reference · print-friendly

Client storage decision playbook

One page for design reviews. Walk top to bottom; stop when a row rejects the current candidate.

1. Gate A · Job (which store?)

If… Prefer…
Re-fetch/re-derive is cheap; dies on refresh OK Memory (framework state)
Tiny string flags; main thread only sessionStorage / localStorage (sparingly)
HTTP assets / app shell offline Cache API (+ service worker)
File-shaped bytes / editor pipelines OPFS (or Blob-in-IDB if record-shaped)
Durable structured app data on this origin IndexedDB
Multi-device source of truth Server + explicit sync; IDB as local cache/queue

2. Gate B · Shape (if IndexedDB)

3. Gate C · Runtime

4. Gate D · Ship risks

5. Sentence template

“We use store family because job; schema stores/keys/indexes + version plan; runtime tx + query shape; we own one risk.”