Glossary
Session cookie
Definition
Session cookie: Either a cookie with no expiry date, which the browser deletes when the session ends (RFC 6265), or the cookie that carries a session identifier keeping a user signed in. Secure, HttpOnly and SameSite attributes limit where it is sent and who can read it.
Also known assession ID cookienon-persistent cookietransient cookiesign-in cookie
In short
A session cookie has two meanings. In the cookie standard, RFC 6265, it's a cookie without an expiry date, which the browser deletes when the session ends. In security, it's the cookie holding your session ID, the token that keeps you signed in. Whoever presents that token is treated as you, so Secure, HttpOnly and SameSite settings and server-side sign-out matter.
Key takeaways
- In RFC 6265 terms, a cookie with no Max-Age or Expires lasts only until the session ends.
- In everyday use, the session cookie is the one carrying your sign-in token.
- Secure keeps it to HTTPS, HttpOnly hides it from page scripts, SameSite controls cross-site sending.
- A stolen session cookie skips your password and second factor.
- Signing out on the server is what actually ends a session; deleting the cookie only forgets it.
Last reviewed 4 December 2026 by Foxcolab Team
A session cookie has two meanings. In the cookie standard, it's a cookie with no expiry date, which the browser deletes when the browsing session ends. In everyday security talk, it's the cookie that holds your session ID, the token that keeps you signed in after you enter your password. RFC 6265 covers both: cookies without Max-Age or Expires expire "at the end of the current session," and servers "commonly store a nonce (or 'session identifier') in a cookie."
The attributes that protect it#
Set-Cookie: SID=31d4d96e407aad42; Path=/; Secure; HttpOnly; SameSite=Lax| Attribute | What it does |
|---|---|
Secure | "Limits the scope of the cookie to 'secure' channels," so it travels only over HTTPS |
HttpOnly | Tells the browser to leave the cookie out of "non-HTTP" APIs such as document.cookie, so an injected script can't read it |
SameSite | Strict, Lax or None: whether the cookie goes with requests other sites start. It comes from the IETF's update to the cookie standard |
Domain | Left out, the cookie stays with one host. Set, it goes to every subdomain |
Max-Age / Expires | Left out, the cookie ends with the session. Set, it persists until that time |
Why a stolen one is so valuable#
OWASP's Session Management Cheat Sheet calls a session ID "temporarily equivalent to the strongest authentication method used by the application." Copy the cookie into another browser and you're signed in, no password or code needed. Infostealer malware, cross-site scripting and adversary-in-the-middle phishing all go after it. That's session hijacking.
Mistakes people make#
- Setting
Domaintoo broadly. A cookie for the whole domain also reaches a forgotten subdomain. See subdomain takeover. - Signing out only in the browser. Deleting the cookie forgets the session on that device, but a copied token keeps working until the server ends the session. OWASP recommends invalidating it on the server.
In Foxcolab#
Foxcolab keeps you signed in with sign-in cookies set for the whole foxcolab.com domain, so one sign-in covers Foxcolab Mail, Drive, Docs and the other apps. They're persistent cookies kept for up to 60 days, which is why closing the browser doesn't sign you out. Sign out in the account menu signs you out in that browser. To end sessions on Foxcolab's servers, open Your devices and use Sign out or Sign out all others; changing your password also ends every other session. Step by step: review active sessions.
Keep exploring
Related terms
- Session hijackingSession hijacking is taking over someone's signed-in session by stealing or guessing the token that keeps them logged in. It skips the password and two-step verification entirely.
- Cross-site scripting (XSS)Cross-site scripting lets an attacker run their own script inside a trusted website, in other people's browsers. Here are the three types, an example and the defenses that work.
- Cross-site request forgery (CSRF)Cross-site request forgery tricks your browser into sending a request to a site where you're signed in, so the site acts on it as if you meant it. Here's how it works and how sites stop it.
- Same-origin policyThe same-origin policy stops a web page from reading data that belongs to another origin. Here's what counts as an origin, what the rule blocks, and where cookies differ.
- Infostealer (information-stealing malware)An infostealer is malware that copies saved passwords, browser cookies and other secrets from a device and sends them to an attacker. Stolen session cookies can skip two-step verification.
- Adversary-in-the-middle phishing (AiTM)Adversary-in-the-middle phishing relays your real sign-in through a fake page and keeps the session it creates, so a password plus a one-time code isn't enough to stop it.

Foxcolab
Private work tools, without the ads.
Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.