Question hub

What is a session cookie?

The answer

A session cookie is a cookie with no Expires or Max-Age attribute, so the browser treats it as temporary and normally removes it when the session ends. The browser decides when that is, and MDN warns that session restore can keep session cookies alive indefinitely. A session cookie is not the same as a server-side session; it usually just carries an identifier. For login state, prefer a short lifetime plus server-side idle and absolute timeouts.

All questions