Question hub
What is an HTTP cookie?
The answer
An HTTP cookie is a small named value that a server asks the browser to store with the Set-Cookie response header. The browser sends it back in the Cookie request header on later requests that match its rules, which lets a stateless protocol remember a login, a basket or a preference. The request header carries only the name and value, never the attributes. RFC 6265 is the specification that defines this mechanism, and MDN's guide to HTTP cookies is a good plain-language companion.