Knowledge Maxxing
← Back to topic library
Dev MaxxingIntermediateIdentity and Access75 sec

Session

A session is a period during which a server recognizes a user as logged in, usually tracked through a token stored on the user's device between requests.

Prerequisite: Authentication

What matters

Because HTTP requests are otherwise independent of each other, a session mechanism is what lets a server remember you're logged in across multiple separate requests.

Example

After logging in, a session token stored in a cookie is sent with each following request, letting the server recognize the same logged-in user each time.

Common misconception

A session is not stored only in the browser; the server also typically tracks or can validate session information, not just trust whatever the client sends.

Recall question

Why is a session mechanism needed given that HTTP requests are otherwise independent?

Keywords and related concepts

sessionlogin stateauthenticationcookie

Related topics

Cookie
Dev MaxxingIntermediate
Authentication
Dev MaxxingIntermediate