Session Storage
Session Storage is a way for websites to temporarily store small pieces of information in your browser while you have a page open. Unlike some other storage methods, the data is kept only for a single browsing session and is generally deleted when you close the tab or browser. It works separately from cookies but serves a similar purpose of remembering information as you use a site.
Session Storage is a mechanism of the browser's Web Storage API, accessed via the read-only Window.sessionStorage property, that stores key/value string pairs scoped to the current origin. Data persists only for the duration of a single page session and is typically cleared when the tab or browser is closed, and it is generally isolated per tab rather than shared across the origin like localStorage. Although not literally a cookie, session storage stores and retrieves information on the user's device; where it is used for non-essential purposes such as analytics or advertising, it may fall within the same consent obligations as cookies under EU and UK ePrivacy rules, which govern the storing of or access to information on a user's terminal equipment regardless of the specific technology. Whether prior consent is required generally depends on the purpose of the storage and the applicable jurisdiction; strictly necessary uses are typically exempt in most EU jurisdictions, while requirements differ under US state privacy laws. This definition addresses the technology itself and does not resolve fact-specific questions about any particular implementation's consent status.
Why it matters
Session Storage matters for compliance because the ePrivacy rules in the EU and UK govern the storing of, or access to, information on a user's terminal equipment regardless of the specific technology involved. Although session storage is not literally a cookie, it stores and retrieves data on the user's device, which means that where it is used for non-essential purposes such as analytics or advertising, it may fall within the same prior-consent obligations that apply to cookies. Consent banners and audits that focus only on cookies can therefore overlook a category of storage that carries similar obligations.
Because session storage data is generally deleted when the tab or browser is closed and is typically isolated per tab, it is sometimes assumed to be lower-risk or exempt. That assumption is not reliable as a matter of law: under EU and UK ePrivacy rules the question of whether prior consent is required generally turns on the purpose of the storage rather than its persistence or technical characteristics. Strictly necessary uses are typically exempt in most EU jurisdictions, while non-essential uses may require consent. Requirements differ under US state privacy laws, which often rely on opt-out rather than opt-in mechanisms.
For compliance teams, the practical significance is that a technology inventory and consent assessment should account for web storage mechanisms alongside cookies. Whether any particular use of session storage requires consent is fact-specific and depends on its purpose and the applicable jurisdiction, so it should be assessed case by case rather than assumed to be outside scope.
Who it's relevant to
Inside Session Storage
Common questions
Answers to the questions practitioners most commonly ask about Session Storage.