Term

Session cookie

Meaning

A session cookie is a cookie with neither Expires nor Max-Age, so the browser treats it as temporary. It is meant to disappear when the browsing session ends, but the browser decides when that is, and MDN warns that session restore features can bring session cookies back so they last much longer than expected. Do not confuse it with a server-side session: the cookie usually carries only an identifier. Use it, or a short lifetime, for authentication state. See also: Persistent cookie, Expires, Max-Age, the guide "Sessions vs Tokens: Where Cookies Fit".

All terms