Web Storage API
The Web Storage API is a feature built into web browsers that lets websites and applications store data directly on the user's device, within the browser itself. It works by saving information as simple name-and-value pairs, and it serves as an alternative to storing data in cookies. Although it is not a cookie, it can be used to hold information about a user on their device, which is why it is relevant to consent and privacy discussions.
The Web Storage API is a browser-provided set of interfaces that allow client-side scripts to securely store key/value string pairs on the user's device. As defined in the WHATWG HTML specification, it introduces two related mechanisms for storing name-value pairs client-side, described as similar to HTTP session cookies. From a compliance perspective, although Web Storage is technically distinct from cookies, the act of storing or accessing information on a user's device via these mechanisms generally falls within the same rules that govern cookies under the EU ePrivacy Directive (and its national implementations), which regulate the storing of and access to information on terminal equipment regardless of the specific technology used. Where the stored data constitutes personal data, its subsequent processing is separately subject to the GDPR. The evidence provided describes the technical function of the API only and does not address specific consent-classification outcomes, which depend on the purpose of the storage and applicable jurisdictional guidance; whether a given use requires prior consent is a fact-specific and evolving question that should be assessed case by case.
Why it matters
The Web Storage API matters to privacy and compliance teams because it is frequently discussed as an alternative to cookies, yet the fact that it lives outside the traditional cookie mechanism does not place it outside the scope of consent obligations. In most EU jurisdictions, the ePrivacy Directive (and its national implementations) regulates the storing of and access to information on a user's terminal equipment regardless of the specific technology used, so storing name-value pairs in Web Storage generally falls within the same rules that govern cookies rather than escaping them. Teams that assume 'not a cookie' means 'not regulated' may misclassify these mechanisms in their consent inventories.
Who it's relevant to
Inside Web Storage API
Common questions
Answers to the questions practitioners most commonly ask about Web Storage API.