A memory aid for a forgetful web

Early websites had a basic problem: the web’s delivery system, HTTP, treats each page request as separate. A server could send a page to a browser, but the next request did not automatically tell the server who was asking or what had just happened. To the site, a visitor could seem new every time they clicked.

A cookie offered a small fix. A website could ask the browser to save a short piece of text—often an identifier—and send it back when the browser returned to that same site. The site could then connect one request to the next, rather than starting from scratch on every page.

From shopping baskets to surveillance

That continuity made ordinary features possible. A site could keep items in a shopping basket as someone moved between pages, remember that a user had signed in, or preserve a preference. The cookie itself usually did not contain a detailed record of a person’s activity; it often served as a label that let the website retrieve or update information on its own system.

The privacy implications changed as advertising systems began using cookies to recognize browsers across many sites. A cookie set by the site a person was visiting is generally called a first-party cookie. A cookie associated with an outside service embedded on that page—such as an ad network—could help that service recognize the same browser elsewhere, building a broader picture of browsing activity.

The technology’s original job was therefore practical: give websites a limited memory between page requests. The same mechanism became useful for tracking when recognition extended beyond the site that first needed to remember its visitor.