Web Cookie

The Web Cookie
The Web Cookie (or cookie, http cookie, etc.) is information stored on a user's computer by the browser -- at the behest of a website -- to assist in maintaining state persistence. Cookies are used in several ways. One of which is to record sensitive authentication data to afford user persistence on a website, removing the need for the user to continuously log on for every site visit or page traversal.

Background
Web cookies were the brain-child of Lou Montoulli, who at the time of the invention, was working at Netscape Communications. A contractee of Netscape at the time, MCI, had requested to offload partial transactional information from the servers of their e-commerce application. Lou, who had previously imagined using Magic Cookies in web communications worked together with John Giannandrea to write the official Netscape cookie specification.

On October 13th, 1994, Netscape officially began to support cookies. The web cookie was then patented by John Giannadrea in 1995 (US 5776470) and granted in 1998.

Applications
Cookies have a plethora of applications since they're designed to store information. The most prominent is storing authentication data to create a seamless browsing experience between sessions and page traversals. Other use cases include storing virtual shopping cart data, persistent video- and music-playback and saving autofill data for home address information.

Variants of Web Cookies
Three types of cookies are used in websites today. Session cookies that are volatile, deleting themselves when the browser is closed; permanent cookies that persist until fully removed from the system; and third-party cookies that are not tied to any one particular website, used for various information gathering purposes.

Source: Verisign

Controversies
There have been numerous controversies surrounding cookies since awareness of their use became widespread. Hackers have used insecure networks to steal cookies (HTTP cookie theft) to hijack user sessions, allowing access to sensitive information. They're also used for targeted advertisements, using user search history to tailor related ads. A similar and notable controversy is Facebook's browser-wide cookie that collects information on a user's browsing habits after they've logged into the service.

Each of these have caused concern over user privacy and called into question the ethics of companies that provide web services to users.