06:00 UTC Charta Aetatis Cyberpunk

Console Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Hacker Culture · HackerNoon · 11d · 4 min read

What Are HttpOnly Cookies? A Simple Guide to Secure Sessions

Open DevTools on a site you're logged into and type document.cookie. Your session cookie is usually missing from the output. The browser has it and sends it with every request, so why can't you see it? Because it's marked HttpOnly. The mental model: a sealed envelope An HttpOnly cookie is a sealed envelope the browser carries for you. The browser delivers it to the server on every request, but JavaScript on the page can't open it, read it or change it. That's the whole idea. The server writes the envelope, the browser carries it, the server reads it. Scripts never touch it. How it works The server sets the cookie with a Set-Cookie response header and adds the HttpOnly flag. The browser

…

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 537 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks