# Session Storage Resources

## Knowledge

- [MDN: Window.sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)
  Page session rules: tab partitioning, survives reload, dies on tab close, opener copy, basic get/set/remove/clear. Use for: lifetime model that makes sessionStorage different from localStorage.
- [MDN: Web Storage API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API)
  Overview of session vs local partitioning; sync cost; third-party iframe notes; private browsing. Use for: orientation and when Web Storage is the wrong scale.
- [MDN: Using the Web Storage API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API)
  Feature detection (`storageAvailable`), setItem/getItem, JSON serialization, StorageEvent (local shared across tabs; session only within tab + same-origin iframes). Use for: practical API and event lesson.
- [MDN: Storage interface](https://developer.mozilla.org/en-US/docs/Web/API/Storage)
  Method map: `length`, `key`, `getItem`, `setItem`, `removeItem`, `clear`. Use for: exact API surface.
- [MDN: StorageEvent](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent)
  Event fired on *other* documents when a storage area changes. Use for: multi-document sync mental model (and why sessionStorage rarely cross-tab).
- [web.dev: Storage for the web](https://web.dev/articles/storage-for-the-web)
  Authoritative FE map; SessionStorage/LocalStorage as limited sync string stores (~5&nbsp;MB, no workers). Use for: when-to-choose framing against IDB / Cache / OPFS.
- [WHATWG HTML: Web storage](https://html.spec.whatwg.org/multipage/webstorage.html)
  Normative Storage interface, sessionStorage/localStorage getters, StorageEvent broadcast rules (session limited to same traversable). Use for: any claim when MDN is vague.
- [MDN: Storage quotas and eviction criteria](https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria)
  Broader quota landscape. Use for: design-review “will this stick?” — Web Storage remains the small, folklore-ish ~5&nbsp;MB bucket.

## Wisdom (Communities)

- [Stack Overflow — [sessionstorage]](https://stackoverflow.com/questions/tagged/sessionstorage) and [web-storage](https://stackoverflow.com/questions/tagged/web-storage)
  Opener copy, private mode, QuotaExceededError, “storage event not firing.” Use for: edge cases — verify against MDN/spec.
- [r/webdev](https://www.reddit.com/r/webdev/)
  Product-context tradeoffs (wizard state, token anti-patterns). Use for: second opinions; treat as anecdotes.

## Gaps

- No single modern “only sessionStorage” long-form guide; most depth is “Web Storage vs IndexedDB.” Teach lifetime/isolation hard, then map API quickly.
- Exact per-browser ~5&nbsp;MB enforcement and private-mode quirks vary; always feature-detect and catch quota errors rather than hard-coding limits.
