Reference · print-friendly
One page for design reviews. Walk top to bottom; stop when a row rejects the current candidate.
| 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 |
upgradeneededversionchangetransaction(stores, mode) — prefer
readonly
put upserts; add create-onceawait mid-transactionget/getAll + range; large →
cursor
transaction.oncompleteblocked UX“We use store family because job; schema stores/keys/indexes + version plan; runtime tx + query shape; we own one risk.”