Session storage is accessible only for the lifetime of the page session : it stays available across reloads in the same tab, but is cleared as soon as that browser tab or window is closed.

What ā€œhow long is session storage accessibleā€ really means

  • A ā€œsessionā€ lasts as long as the tab/window where the site is open remains open.
  • Data in sessionStorage survives page reloads and in‑tab navigation (e.g., clicking links, SPA routing) within that same tab.
  • As soon as the user closes that tab or window, the browser ends the page session and automatically wipes all sessionStorage data for that origin in that tab.
  • Opening the same site in a new tab or window creates a completely new page session with its own fresh sessionStorage instance.

In other words, there is no ā€œtime-basedā€ expiration like ā€œ30 minutesā€; the storage is tied to the lifecycle of the tab/window , not a clock.

Quick comparisons (context for forums and dev discussions)

Here’s how session storage stacks up against other browser storage options often mentioned in forum and ā€œtrending topicā€ discussions about client-side storage:

Storage type How long accessible? Scope Typical use
Session storage Until tab/window is closed (persists across reloads) Per-tab / per-window page session Temporary state, form buffers, view filters within one visit
Local storage Indefinite (until cleared by code or user) All tabs/windows for that origin Longer-lived preferences, simple cached data
Cookies Configurable expiry (or session-only if no expiry set) All tabs/windows for that origin, sent with HTTP requests Auth tokens, server sessions, tracking
[9][1][4][5][7][3]

Practical example (how it feels as a user)

Imagine a multi-step checkout in one tab:

  1. The site stores partial form data in sessionStorage so a reload doesn’t lose your progress.
  1. You refresh or navigate around within that tab – your data is still there.
  2. You close the tab entirely, then reopen the site in a new tab – the previous sessionStorage data is gone because it belonged to the old page session.

That’s the core idea behind ā€œhow long is session storage accessibleā€: for as long as that specific tab/window lives, and no longer.

Information gathered from public forums or data available on the internet and portrayed here.