Reference
60-second design-review scan. Print-friendly. Pair with lesson 3.
| Need | Prefer |
|---|---|
| Survive close + share all tabs | localStorage (tiny) or server preference |
| Structured / large / offline | IndexedDB |
| HTTP shell / assets offline | Cache API (+ SW) |
| File-shaped bytes | OPFS |
| Multi-tab live sync | BroadcastChannel / localStorage events / server — not sessionStorage |
| Re-fetch is cheap | Memory only |
storageAvailable("sessionStorage") probe (try set/remove) before relying on itgetItem / setItem / removeItemJSON.stringify / parse with null guardstry/catch on writes → handle QuotaExceededErrorstorage events on other tabs for session writeswindow.open starts with a copy, then diverges