$ ./guess_the_languageCybersecurity
Cybersecurity · hard · #161

What does the HttpOnly flag do?

Set-Cookie: sid=abc; HttpOnly; Secure; SameSite=Strict
  1. Hides the cookie from JavaScript
  2. Sends the cookie over HTTP only
  3. Expires the cookie on logout
  4. Encrypts the cookie's value
HttpOnly blocks document.cookie access, so stolen XSS cannot read the session.
Play Cybersecurity ▸