Cookie Basics Cookie Editor guide

Session Cookies vs Persistent Cookies: What Is the Difference?

One kind disappears when you close the browser, the other has a diary date. How to spot each in Cookie Editor and why sites use both.

Illustration comparing a cookie that fades when a browser closes with one that survives on a calendar

The difference is a single field: an expiry date. A persistent cookie has one, so your browser files it away and keeps sending it until the date passes, days, months, sometimes a year later. A session cookie has no expiry, so the browser holds it in memory and throws it away when the browser closes. Everything else about the two kinds, name, value, domain, path, works identically.

How each kind behaves

Session vs persistent cookies
Session cookiePersistent cookie
Expiry fieldNone (shown as “Session”)A specific date and time
Survives closing the browser?NoYes, until the expiry date
Survives restarting the computer?NoYes
Typical jobsSign-in state, basket during a visit, multi-step formsTheme and language preferences, consent choices, “remember me”
In Cookie EditorExpiry reads Session / blankExpiry shows the date

Why sites split the work this way

Security-sensitive state is kept short-lived on purpose: if your sign-in is a session cookie, closing the browser ends it, which limits the damage if someone later uses the same machine. Convenience state is the opposite, nobody wants to re-pick a language every visit, so preferences get long expiries. When a site offers “remember me”, it usually swaps the sign-in to a persistent cookie with a modest expiry instead of a session one.

Check which kind you are looking at

  1. Open the site and Cookie Editor

    Load the page, open the panel and find the cookie by name.

  2. Expand the entry

    Look at the expiry field: a date means persistent; “Session” or an empty field means session.

  3. Run the restart test

    Note the cookie, close the browser completely, reopen it and check the same site. A session cookie is gone; a persistent one is still listed.

Edge cases worth knowing

Modern browsers with “continue where you left off” startup settings may restore session cookies along with your tabs, which can make a session cookie look persistent, the browser is resuming the session, not breaking the rule. Also, editing a cookie's expiry in Cookie Editor changes what your browser does, but the site's server may still enforce its own session lifetime. If edits or lifetimes behave oddly, the edits-not-saving guide walks through the causes.

Expiry dates you will actually see

Real sites pick surprisingly varied lifetimes, and reading them tells you what the site thinks the data is worth. A consent choice commonly gets six to twelve months, long enough not to nag, short enough to re-ask eventually. A theme or language preference often gets a year. Analytics IDs can be set for years, then shortened by browser caps. A “remember me” sign-in is typically days to a month, deliberately shorter than any preference. When a lifetime looks wrong for the job, a session cookie storing a sign-in that should persist, or a preference that expires in an hour, you have usually found either a bug or a deliberate privacy choice, and either way it is worth a note in your test log.

How to tell which kind you are looking at

In Cookie Editor the distinction is visible at a glance: expand a cookie and look at its expiry. A date and time in the future means a persistent cookie, with the date telling you exactly how long the site intends to remember this. The word session, or no date at all, means the cookie is marked to die with the browser session. Do this check on a few familiar sites and patterns emerge quickly: preferences carry dates, sign-ins usually do not, and anything with a date years away is an identifier the site hopes to keep.

The restart test, and its modern wrinkle

The classic test is to close the browser completely, reopen it, and see which cookies survived. It still works, but modern browsers blur it: 'continue where you left off' startup settings and session restore can resurrect a browsing session, and some browsers restore session cookies along with the tabs. If a session cookie seems to survive a restart, check the browser's startup setting before concluding the site cheated; the cookie may have been restored by the browser as part of your previous session, not kept alive by the site.

Which kind should a site choose?

The honest answer is that the data decides. Anything that grants access, a sign-in, a checkout in progress, should be short-lived, so a stolen or leftover copy ages out quickly. Anything that is merely a convenience, a theme, a language, a region, can live longer because the harm if it leaks is trivial. When you find the reverse, a sign-in that lasts a year or a theme that dies hourly, you have found either a deliberate trade-off the site chose for its users, or a bug worth reporting. Either way, you now know how to see it, which most users never do.

Frequently Asked Questions

Can a site change a session cookie into a persistent one?

Yes, it re-sends the cookie with an expiry date, and the browser updates the stored record. You will see the expiry appear in Cookie Editor after a reload.

Why did my session cookie survive a restart?

Check your browser's startup setting: restoring previous tabs can restore session cookies too. Disable session restore to see the plain behaviour.