1. Home
  2. Glossary
  3. Cookie attributes
Security

Cookie attributes (Secure, HttpOnly, SameSite)

Flags that protect cookies. Secure sends the cookie only over HTTPS, HttpOnly hides it from JavaScript, and SameSite limits when it is sent on cross-site requests.

Why it matters

These flags limit how a cookie can be read or sent, which reduces the impact of script injection and cross-site request forgery.

Example

Set-Cookie: session=abc; Secure; HttpOnly; SameSite=Lax

Where you will see it

The free Security headers checker looks at this on a live page and explains what it finds in plain English: grade HSTS, CSP and the other protective headers, with copy-paste fixes for Nginx, Apache, Cloudflare and Netlify.

Related terms

  • HTTP header: A name and value pair sent along with a request or a response.
  • TLS: Transport Layer Security, the protocol that encrypts the connection between browser and server.
  • Content-Security-Policy: An HTTP response header that lists which sources a page may load scripts, styles, images and other resources from.

Go deeper

  • HTTP headers explained: What HTTP response headers are, the ones that matter for caching, content, redirects, cookies, crawling and security, and how to view and read them.

← All 66 glossary terms

↑ ↓ to moveEnter to openEsc to closeAll results