Glossary
Cookie
A small piece of data a website stores in a visitor's browser to recognize them on return visits or across pages.
Also called: HTTP cookie, browser cookie
A cookie is a small piece of data — a key-value pair — that a website asks a visitor's browser to store, either via an HTTP response header or JavaScript, and which the browser then sends back to that same domain on later requests. Cookies are what let a site recognize a returning visitor, keep someone logged in between pages, or remember items in a cart.
Cookies are set either as first-party, by the domain the visitor is actually on, or as third-party cookies, by a different domain such as an embedded ad or tracking script, which is the distinction that matters most for analytics and privacy. A cookie also differs from other browser storage like localStorage in that it is automatically attached to every matching HTTP request, which is exactly what makes it useful for tracking but also what draws regulatory attention.
Cookies remain central to session tracking, unique visitors counts, and login persistence, but their use for tracking is increasingly regulated: laws such as the EU's ePrivacy rules and General Data Protection Regulation generally require informed consent before setting non-essential cookies, typically managed through a consent management platform on the site. Practitioners should not assume "cookie" and "third-party tracker" are the same thing — a site's own first-party analytics cookie faces different rules and different browser restrictions than a third-party ad-tracking cookie does.
Last reviewed September 22, 2026