HTTP

Tag

Cookies

10 resources tagged Cookies across methods, status codes, headers, cookies, guides, and glossary.

Guides

Cookie Security: HttpOnly, SameSite, and Secure Flags

A comprehensive guide to understanding and implementing secure HTTP cookies to protect against XSS, CSRF, and session hijacking attacks.

Cookie Attributes

Domain

Learn how the Domain cookie attribute controls which domains can access cookies. Understand subdomain sharing, security implications, and restrictions.

Cookie Attributes

Expires

Learn how the Expires cookie attribute sets an absolute expiration date. Understand date formats, timezone handling, and when to use Expires vs Max-Age.

Guides

HTTP Sessions and State Management Explained

Learn how to manage user state and sessions in stateless HTTP applications using cookies, tokens, and server-side storage.

Cookie Attributes

HttpOnly Cookie Attribute: XSS Protection

Learn how the HttpOnly cookie attribute protects against XSS attacks by preventing JavaScript access to sensitive cookies.

Cookie Attributes

Max-Age

Learn how the Max-Age cookie attribute sets expiration in seconds from now. Understand why Max-Age is preferred over Expires for reliable lifetime control.

Cookie Attributes

Path

Learn how the Path cookie attribute restricts which URL paths can receive cookies. Understand path matching rules and how to scope cookies to specific routes.

Cookie Attributes

SameSite Cookie Attribute: CSRF Protection

Learn how the SameSite cookie attribute prevents CSRF attacks, the differences between Strict, Lax, and None, and when to use each.

Cookie Attributes

Secure

Learn how the Secure cookie attribute ensures cookies are only sent over HTTPS connections. Protect sensitive data from man-in-the-middle attacks.

HTTP Headers

Set-Cookie

Learn how the Set-Cookie header instructs browsers to store cookies with attributes like HttpOnly, Secure, SameSite, and expiration settings.