Software · guide

What is a session cookie? What MDN and the ICO say, and the vendors

By Alberto Gulotta · Updated · 10 min read

What is a session cookie? MDN says it is a cookie with no Max-Age or Expires attribute, deleted when the session ends, and usually the carrier of a session ID. Per the ICO, consent depends on what it does; vendors often say it is exempt. This page sets out the definitions, the ICO test and where vendors differ.

The short answers, from MDN, the ICO, Chrome Help and four vendors, read on 25 October 2026
QuestionAnswerWhere it comes from
What is a session cookie?A cookie without a Max-Age or Expires attribute, deleted when the current session endsMDN
What does it usually hold?A session ID that records the browser’s sign-in statusMDN, Cloudflare
When does it really end?The browser decides; with session restore it can last indefinitelyMDN, UniConsent
Does it need consent?It depends on what it does, not how long it lasts; vendors differICO, UniConsent
How do I see a site’s cookies in Chrome?Privacy and security, Third-party cookies, See all site data and permissionsChrome Help

What MDN and Cloudflare say it is

MDN’s guide to HTTP cookies describes the common use: the user signs in, the server checks the credentials and responds with a cookie containing a session ID that records the sign-in status on the browser. Later the browser sends that cookie with each request, and the server checks the session ID and, if it is still valid, sends a personalised page; if it is not valid, the session ID is deleted and the user sees a generic page or is asked to sign in again. MDN lists session management among the uses of cookies: sign-in status, shopping cart contents, game scores or other session details the server needs to remember. Cloudflare’s learning page says the same with an example: a shopping site’s server generates a session cookie when someone logs in, and that cookie contains a unique string of letters and numbers that matches the session with the relevant data for that user.

MDN separates two kinds by the attributes in the Set-Cookie header. Permanent cookies are deleted after the date in Expires. Session cookies are cookies without a Max-Age or Expires attribute, and they are deleted when the current session ends. That is the whole answer to what is a session cookie in technical terms: a cookie that has no expiry date, so the browser treats it as belonging to the visit.

Table of session and permanent cookies according to MDN, and who decides when a session ends
No expiry means a session. Figure drawn by AI Tools Primer from MDN Web Docs, read on 25 October 2026.

When a session really ends

MDN says the browser defines when the current session ends, and that some browsers use session restoring when restarting, which can cause session cookies to last indefinitely. UniConsent gives the examples: if your browser is set to restore your previous session, such as Continue where you left off in Chrome or Open previous windows and tabs in Firefox, it may keep session cookies after a restart, and some mobile browsers rarely end a session at all because the app is not fully closed. CookieYes, in an article dated 3 March 2026, says in most cases session cookies are removed when the browser is closed but that the behaviour depends on browser settings, device type and how the cookie is configured. Cookiebot and Transcend, by contrast, say the cookie is deleted when the user closes the browser, without that caveat.

MDN also gives a security point: if your site authenticates users, it should regenerate and resend session cookies, even ones that already exist, whenever a user authenticates, to help prevent session fixation attacks, where a third party can reuse a user’s session. Transcend says that although session cookies don’t require explicit consent under the GDPR, businesses still need security measures to prevent hijacking and unauthorized access.

Table of the uses the ICO lists as likely exempt from consent: login for the visit, load balancing, a preference
Purpose decides. Figure drawn by AI Tools Primer from the ICO, read on 25 October 2026.

What the vendors say, and where they differ from the ICO

Four of the pages on this topic are written by sellers of consent tools. CookieYes says session cookies fall under the strictly necessary category under the GDPR, are exempt from the consent requirements and are therefore compliant, and that websites can set them without consent but should say what they do, usually in a banner. Transcend, dated 14 February 2025, says session cookies don’t require explicit consent under the GDPR, being necessary for website operations, and elsewhere that they are often exempt. Cookiebot, dated 26 November 2024, says session cookies often fall into the strictly necessary category and are generally exempt from explicit consent, but that analytics cookies typically need consent even if temporary, because they are not strictly necessary.

UniConsent is the one that matches the ICO: it says it depends on what the cookie does, not how long it lasts, citing Article 5(3) of the ePrivacy Directive, which requires prior consent unless the cookie is strictly necessary for a service the user has asked for, with the GDPR setting the standard for that consent. Cloudflare also names the ePrivacy Directive. CookieYes, Cookiebot and Transcend, in the pages we read, speak of the GDPR and do not cite the ICO’s list or MDN. The flat statements leave out the conditions the ICO sets, such as the purpose and the persistent identifier. CookieYes, Cookiebot, Transcend and UniConsent all sell consent tools.

Table of what CookieYes, Transcend, Cookiebot and UniConsent say about consent for session cookies
Four vendors, two answers. Figure drawn by AI Tools Primer from CookieYes, Transcend, Cookiebot and UniConsent, read on 25 October 2026.

Seeing and clearing the cookies in Chrome

Chrome Help says to open Settings, then Privacy and security, then Third-party cookies, and select See all site data and permissions, where you can search for a site and remove its data. It warns that if you delete cookies you may get signed out of sites that remember you and your saved preferences can be deleted. The vendors’ pages give no step for finding a session cookie in the browser: CookieYes suggests a cookie scan of a website, which is a different job. For the settings that allow or block cookies, see enabling cookies in Chrome, and for what clearing them does, what clearing the cache does.

Where to start

Five ways in.

“The definition.”
What MDN says — what
“When does it go?”
When a session ends — end
“Need I ask?”
The ICO on consent — consent
“Are vendors right?”
Where vendors differ — vendors
“Where is it?”
In Chrome — find

Cookies, caches and privacy

Allowing, clearing and what clearing does.

Questions people also ask

What is the difference between session cookies and persistent cookies?

MDN: a session cookie has no Max-Age or Expires and is deleted when the session ends; a permanent cookie is deleted after the date in Expires.

How do I find my session cookie?

In Chrome, Settings, Privacy and security, Third-party cookies, See all site data and permissions, then search for the site. The vendor pages we read give no browser step.

How do I accept session cookies?

Through the browser’s cookie settings. Chrome Help describes allowing or blocking third-party cookies and exceptions for particular sites; see our page on enabling cookies in Chrome.

What is the difference between a cookie and a session token?

MDN and Cloudflare describe the session cookie as the carrier of a session ID, a unique string that matches the browser with a session on the server.

Not covered here. We did not inspect a cookie in a browser. The statements come from MDN Web Docs (using HTTP cookies), the ICO (what are the exceptions), Chrome Help (delete, allow and manage cookies), Cloudflare’s learning page and four vendor pages: CookieYes (3 March 2026), Cookiebot (26 November 2024), Transcend (14 February 2025) and UniConsent, used for what they claim. MDN, the ICO, Chrome Help, Cloudflare and UniConsent carry no date that we could read. This is not legal advice.

Reddit, Medium, Stack Overflow and MojoAuth results were not used. The ICO’s guidance concerns the UK; the position in other countries is outside this page.

The search volume and difficulty behind this page were read in Semrush on 29 August 2026.

Sources

  1. MDN Web Docs — Using HTTP cookies — developer.mozilla.org, read 25 October 2026.
  2. ICO — What are the exceptions? — ico.org.uk, read 25 October 2026.
  3. Google Chrome Help — Delete, allow, and manage cookies in Chrome — support.google.com, read 25 October 2026.
  4. Cloudflare — What are cookies? — www.cloudflare.com, read 25 October 2026.
  5. CookieYes — What are session cookies? Do they need consent? (3 March 2026) — www.cookieyes.com, read 25 October 2026.
  6. Cookiebot — What Are Session Cookies? (26 November 2024) — www.cookiebot.com, read 25 October 2026.
  7. Transcend — Session Cookies: From Basics to Best Practices (14 February 2025) — transcend.io, read 25 October 2026.
  8. UniConsent — What Is a Session Cookie? Definition, Examples & GDPR — www.uniconsent.com, read 25 October 2026.

Written by Alberto Gulotta

Founder and editor of AI Tools Primer, writing from Palermo, Italy. Thirty-five years of taking computers apart, starting with a Commodore 64 — the long version is on the about page.

Something wrong on this page? Write to aitoolsprimer@gmail.com and it gets fixed.

Written on 25 October 2026.

Independence and limits

No affiliate links and no paid placements anywhere on this site. Nobody pays to appear here, and no company has seen this page before you did.

This is general information, not professional advice. Where a page touches money, health, safety or the law, it names its source and the date it was read — and your situation may still differ. See the privacy page and the cookie policy.