Cookie
An HTTP cookie is a small piece of data that a server asks a user agent to store and return with subsequent requests within its scope.
ASP.NET Core in Action, 3e
An authentication cookie is a client-side HTTP cookie containing serialized authentication state used to recognize a signed-in user across requests.
- How it is used
- Keeps users signed in across requests to traditional web apps by carrying serialized authentication state in a browser cookie.
- How deep it goes
- Works through sign-in, principal serialization, and subsequent-request validation, then addresses authorization responses and CSRF risk.
- Examples
- Uses a Razor Pages sign-in flow and a forged bank-transfer form to illustrate normal behavior and risk.
- What you can do after
- Evaluate/understand it by tracing how a signed-in principal reaches later requests and distinguishing it from the database user entity.
The Well-Grounded Python Developer: How the pros use Python and Flask
A cookie is client-side data exchanged with a web server on subsequent requests to retain information or identify a client.
- How it is used
- Connects successive HTTP requests to a session so a blog can remember users and restrict posting or commenting.
- How deep it goes
- Works through creation, signing, request reuse, lifetime, login, and logout; defers detailed database treatment.
- Examples
- Uses a blog login flow, a user record, restricted posts and comments, and a logout route.
- What you can do after
- Apply it via Flask and Flask-Login to remember authenticated users across requests and log them out.
Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains cookie →
Grokking Web Application Security
A cookie is a small piece of text that a web server directs a browser to store and send with subsequent requests to the applicable domain.
- How it is used
- Maintains authenticated browser sessions across stateless HTTP requests.
- How deep it goes
- Explains cookie request flow and security attributes, including expiry and logout invalidation.
- Examples
- Uses Set-Cookie and Cookie headers, a session identifier, and logout via Max-Age=-1.
- What you can do after
- Operate/configure session cookies with transport, script-access, cross-site, lifetime, and logout protections.
Read how Grokking Web Application Security explains cookie →
Building Web APIs with ASP.NET Core
Session-cookie authentication stores authentication state on a server-side session and sends a session identifier to the client in a cookie.
- How it is used
- Maintains authentication state across otherwise independent HTTP requests and supports authorization checks.
- How deep it goes
- Explains the storage, identifier, cookie, and retrieval flow without detailing framework-specific configuration.
- Examples
- Uses a login result, a stored user identity, a generated sessionId, and repeated browser requests.
- What you can do after
- Evaluate how a server preserves login state and identifies users on subsequent requests.
Read how Building Web APIs with ASP.NET Core explains cookie →
Pro ASP.NET Core 7, Tenth Edition
A cookie is a small piece of data that a web server stores in a client and receives with subsequent requests to maintain state or preferences.
- How it is used
- Carries values into later requests to support counters and authenticated access.
- How deep it goes
- Works through reading, appending, configuring, deleting, and inspecting cookies, then applies them to authentication; does not examine browser storage internals.
- Examples
- Uses a thirty-minute visit counter, a cookie-inspection Razor Page, and a JavaScript client that logs in before requesting protected data.
- What you can do after
- Build it from scratch with ASP.NET Core request and response cookie APIs, then inspect cookie-based sign-in and logout behavior.
Read how Pro ASP.NET Core 7, Tenth Edition explains cookie →
Coding with AI
A cookie is a small piece of data that a web browser stores and sends with requests to preserve client-specific state.
- How it is used
- Preserves a user's database-backed web session across page requests and refreshes.
- How deep it goes
- Explains reading, creating, setting, and deleting a session cookie, while stopping short of broader cookie security considerations.
- Examples
- Uses a Flask practice-test page, a session_id cookie, response.set_cookie, refresh persistence, and a delete-and-refresh button.
- What you can do after
- Operate/configure a Flask route that persists, reuses, and clears a database-backed session through a browser cookie.
React in Depth
A web cookie is a small piece of data that a website stores in a browser and can send with subsequent requests to a server.
- How it is used
- Persists small display and location preferences that server-rendered React pages must know before hydration.
- How deep it goes
- Explains request transmission, capacity trade-offs, hydration failure, and framework APIs, stopping short of broader cookie security policy.
- Examples
- Uses weather-scale, time-format, and local-city preferences, with Next.js and Remix route implementations.
- What you can do after
- Apply it via cookies-next or Remix cookie utilities to synchronize small preferences between requests, server rendering, and clients.
WordPress Power Toolkit: Harness AI to build next-level websites
A cookie is a small text file that a website stores on a user's device to retain information, track activity, personalize experiences, or support data collection.
- How it is used
- Supports remembered actions, administrator access, tracking, personalization, advertising, and website data collection.
- How deep it goes
- Defines cookies and shows practical uses, consent concerns, and plugin options without detailing browser-level implementation.
- Examples
- Uses remembered forms and logins, administrator access to a hidden site, and WordPress cookie-consent plugins.
- What you can do after
- Operate WordPress cookie features and choose consent measures for sites that store visitor cookies.
Read how WordPress Power Toolkit: Harness AI to build next-level websites explains cookie →
First-Party Data Activation
A first-party cookie is a web cookie created and controlled by the site owner for recognizing users or sessions within that owner's own interactions and infrastructure.
- How it is used
- Connects anonymous website activity to acquisition marketing and later account interactions.
- How deep it goes
- Defines cookies by domain ownership and describes session continuity and account linking, without detailing implementation.
- Examples
- Uses shopping-cart continuity and an airline flight choice connected to an account after sign-in.
- What you can do after
- Understand how first-party cookies preserve session context and connect prelogin activity to a signed-in account.
Real-World Cryptography
A cookie is a small piece of data stored by a web browser and sent with subsequent requests to a website.
- How it is used
- Maintains user authentication across multiple web requests without repeatedly sending credentials.
- How deep it goes
- Explains browser storage, session identifiers, scaling tradeoffs, tampering, and MAC-based protection.
- Examples
- Uses login credentials, random session strings, editable usernames, and authentication tags as concrete examples.
- What you can do after
- Apply browser cookies for persistent sessions and recognize why unauthenticated cookie contents enable impersonation.
Related concepts
- JSON Web Tokenalternative to · A JSON Web Token is a compact, URL-safe representation of claims encoded as a JSON object and protected by a digital signature, message authentication code, or encryption.
- local storagealternative to · Local storage is a browser-provided, origin-scoped key-value storage mechanism that persistently stores string values across sessions.
- bearer authenticationalternative to · Bearer authentication is an authentication scheme in which presenting a bearer token is sufficient to use the access or authorization granted by that token.
- browserused by · A web browser is software that retrieves, interprets, and renders web resources, executes supported web content, and enables interaction with web pages and applications.
- third-party cookieincludes · A third-party cookie is a browser cookie set or accessed by a domain different from the website currently being visited.
- HTTPSaddressed by · HTTPS is HTTP carried over TLS, which provides encryption and endpoint authentication for network communication.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









