
HTTP cookie
A small piece of data that a website stores in the user's browser so it can remember information between visits.
- Year
- 1994
- People involved
- Lou Montulli
- Section
- Computing
History
An HTTP cookie is a small block of data that a web server sends to the browser, which then returns it unchanged with later requests. Its basic purpose is to give memory to a web that, by design, treats each request as an isolated event. Thanks to cookies, a site can remember that you are logged in, which items are in your shopping cart or which preferences you chose, and it can also follow your activity over time, which is why they are central to the modern web and a long-standing privacy concern.
Before cookies, HTTP, the protocol that browsers and servers use to communicate, kept no state between requests. The idea of a "magic cookie" already existed in computing: a packet of data that a program receives and sends back unchanged, used by Unix programmers. The computer programmer Lou Montulli adapted that idea to web communications. In June 1994 he worked at Netscape Communications, which was building an e-commerce application for MCI. MCI did not want its servers to keep partial transaction states, so it asked Netscape to store that state on each user's computer instead. Cookies offered a reliable way to implement a virtual shopping cart. That same year, Montulli and John Giannandrea wrote Netscape's initial cookie specification.
Version 0.9beta of Mosaic Netscape, released on 13 October 1994, already supported them. Their first use outside the lab was to check whether visitors to the Netscape website had been there before. Montulli applied for a patent in 1995, which was granted in 1998. Internet Explorer added support in version 2, released in October 1995. At first the public barely knew they existed: they were accepted by default and users were not told. The issue reached the press after a Financial Times article of 12 February 1996, and that year they drew heavy media attention because of their privacy implications. The U.S. Federal Trade Commission discussed them at hearings in 1996 and 1997.
Meanwhile, the IETF, the body that develops Internet standards, began a formal specification in 1995, using Netscape's proposal as a starting point. In February 1996 its working group flagged third-party cookies, those set by a domain other than the one the user is visiting, as a serious privacy threat. The resulting document, RFC 2109, published in February 1997, recommended that third-party cookies be disallowed or at least disabled by default. Netscape and Internet Explorer did not follow that advice. RFC 2109 was replaced by RFC 2965 in October 2000, and the definitive RFC 6265, published in April 2011, described how cookies were really used.
Today cookies tell servers who is who and let them behave differently for each user: keeping a session open, personalising a page's layout or holding a shopping cart. Third-party cookies also allow a person's browsing to be followed across different sites, and that information can be combined into profiles used for targeted advertising. In 2011 European and U.S. lawmakers acted on these concerns, and European law now requires informed consent before non-essential cookies are stored. In short, cookies give the web a memory, with the benefits and risks that come with it.
Timeline
- 1994Lou Montulli proposes using cookies for web communications in June, and in October a test version of Mosaic Netscape already supports them.
- 1995Internet Explorer 2 adds cookie support, and the IETF starts work on a formal specification.
- 1996A Financial Times article brings cookies to the general public, and the IETF working group identifies third-party cookies as a privacy threat.
- 1997RFC 2109 is published, recommending that third-party cookies be disabled by default, a advice browsers do not follow.
- 1998Montulli is granted a patent for cookie technology.
- 2011RFC 6265 is published, the specification describing cookies as they are actually used.
Trivia and anecdotes
The name comes from Unix computing
The word cookie comes from the magic cookies used by Unix programmers, data packets that a program receives and returns unchanged.
Accepted without warning
For years they were accepted by default and users were not notified, a situation that changed after the media attention of 1996.