🌐HTTP Cookie
Also known as Cookie, Browser Cookie, Web Cookie, Set-Cookie, HttpOnly
A small piece of text a site stores in your browser, sent back on each visit.
Think of it like
Think of it like a cloakroom ticket. You show it each time you come back, so they know which coat is yours.
Example
Jack logs into a shop. The site sets a cookie with his session id, so the next page knows who he is.
Why it matters
Cookies are how websites remember you between pages. Logins depend on them.
Definition
Example code
http
Set-Cookie: session=abc123; HttpOnly; Secure; Max-Age=3600Common mistake
Key takeaways
- 1Kept by the browser. Sent back on every request.
- 2Remembers you. Logins, carts and settings.
- 3Lock it down. Use HttpOnly and Secure.