DELAPARRA
Index
Color
NL
Category: HTTP headers

Cookie

Explained by Updated

What is Cookie?

Cookie: Cookies the browser is sending back to the server for this domain. The Cookie request header carries the cookies a browser has stored for the site back to the server, such as session=abc123; theme=dark. The server set them earlier with Set-Cookie. This is how login sessions work on most websites. The session cookie identifies the browser, and the server looks up who is logged in.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Cookie

What should you keep in mind with Cookie?

Because cookies are sent with every request to the domain, keep them few and small. Large cookies slow down every page and image request. For session cookies, set HttpOnly so JavaScript cannot read them, Secure so they only travel over HTTPS, and SameSite to limit cross-site use. Under the GDPR and ePrivacy rules, functional session cookies are fine, but tracking cookies need consent first.

What does an example of Cookie look like?

Cookie: session=abc123; theme=dark

At a glance

CategoryHTTP headers
Explained by
Updated

More HTTP headers terms

All terms starting with C

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.