Local Storage
Local Storage is a feature built into web browsers that lets a website save small pieces of information directly on your device, such as your settings or consent choices. Unlike some cookies, this data has no expiration date and remains available even after you close and reopen the browser. Because it stores information on a user's device, it can raise the same consent considerations that apply to cookies, depending on what is stored and where the user is located.
Local Storage is part of the HTML Web Storage API (the localStorage object), which allows a website's scripts to persist key-value string pairs in the browser with no built-in expiration. The data is domain-scoped, persists across browser sessions until explicitly cleared, and is accessible to client-side code on the originating site. Although it is not a cookie, Local Storage involves both storing and accessing information on a user's terminal equipment, which in most EU jurisdictions falls within the scope of the ePrivacy rules governing device storage and access; where non-essential purposes such as analytics or advertising are involved, prior consent is generally required. Any personal data subsequently processed via Local Storage is additionally governed by the GDPR in the EU. Requirements differ under other regimes, such as US state privacy laws that often rely on opt-out mechanisms, and the precise obligations depend on the nature and purpose of the stored data. This definition addresses the technology in general terms and does not resolve jurisdiction-specific classification of any particular Local Storage use.
Why it matters
Local Storage matters for compliance because it is frequently overlooked in cookie audits. Many organisations focus their consent efforts on cookies specifically, while Local Storage, along with related technologies such as pixels and SDKs, can store and access information on a user's device in ways that raise the same regulatory considerations. Because Local Storage involves both storing and accessing information on a user's terminal equipment, in most EU jurisdictions it generally falls within the scope of the ePrivacy rules that govern device storage and access, regardless of the fact that it is technically distinct from a cookie.
The persistence of Local Storage adds to its significance. Unlike cookies that may carry an expiration date, data written to Local Storage has no built-in expiration and remains on the device across browser sessions until it is explicitly cleared. This durability makes it attractive for legitimate purposes such as remembering settings or storing a user's consent choices, but it can also be used for analytics or advertising purposes that typically require prior consent in the EU. Where Local Storage is used for non-essential purposes, the same consent standards that apply to non-essential cookies generally apply here as well.
Because requirements differ across jurisdictions, teams should not assume that a single approach satisfies every regime. EU and UK expectations around prior consent for non-essential storage differ from several US state privacy laws, which often rely on opt-out mechanisms rather than opt-in. The precise obligations depend on the nature and purpose of what is stored, and the classification of any particular Local Storage use may be contested or unresolved, so this concept should be assessed against the specific facts and applicable law rather than treated as automatically exempt.
Who it's relevant to
Inside Local Storage
Common questions
Answers to the questions practitioners most commonly ask about Local Storage.