Cookies
HTTP is stateless — each request stands alone. Cookies are small pieces of data a site stores in your browser so it can recognize you on the next request.
How they work
The server sends a Set-Cookie header; the browser returns that cookie on future requests to the same site.
Common uses
- Staying logged in
- Remembering preferences
- Shopping carts
Privacy
Because cookies can track activity, browsers give users control over them and laws often require sites to ask for consent.