HTTP Cookies
An HTTP cookie is a small piece of data that a website sends to your web browser, which stores it on your device. Websites use cookies to remember information about you, such as keeping you logged in or tracking your browsing activity, so that the site can recognize you across pages or later visits. Because cookies can store or access information on your device, their use is subject to legal rules that vary by jurisdiction.
An HTTP cookie is a small block of data created by a web server and stored on a user's device by the browser, typically transmitted via the Set-Cookie response header and returned to the server on subsequent requests via the Cookie header. Cookies allow otherwise stateless HTTP interactions to maintain state, enabling functions such as session management, personalization, and tracking of browsing activity across pages or sessions. From a compliance perspective, the placing of and access to cookies (and functionally similar technologies such as pixels, local storage, SDKs, and fingerprinting) is governed in the EU and UK primarily by the ePrivacy Directive and its national implementations, which generally require prior consent for non-essential cookies, while any resulting processing of personal data is separately governed by the GDPR; obligations differ under other regimes such as US state privacy laws, which often rely on opt-out mechanisms. The classification of a given cookie (for example, strictly necessary versus analytics or advertising) determines whether consent is required and is a fact-specific assessment outside the scope of this technical definition.
Why it matters
HTTP cookies are the foundational technology that makes stateful web experiences possible, but they are also the primary mechanism through which websites can store or access information on a user's device and track browsing activity across pages and visits. Because of this dual role, cookies sit at the center of most cookie consent and privacy compliance obligations. Whether a given cookie can be set without user permission depends on its purpose: strictly necessary cookies (such as those maintaining a login session) are generally exempt from consent requirements in the EU and UK, while non-essential cookies used for analytics, advertising, or similar purposes typically require prior consent under the ePrivacy Directive and its national implementations.
Who it's relevant to
Inside HTTP Cookies
Common questions
Answers to the questions practitioners most commonly ask about HTTP Cookies.

