NOTE
2.13 Cookie and Session
The server creates a session and sends its identifier to the browser in a cookie. Later requests carry that identifier so the server can recognize the session.
This is a historical learning note and may contain outdated or incomplete understanding.
1. How Cookie + Session Works
The browser accesses the server. The server creates a session representing the conversation, generates a session ID to identify it, sets the session ID in a cookie, and returns it to the browser. Every time the browser accesses the server, it carries the cookie containing the session ID. After obtaining the session ID, the server can determine which user is accessing it.
2. Cookie vs. Session
| Cookie | Session | |
|---|---|---|
| Location | Stored in the browser | Stored on the server |
| Format | Text file | Memory |
3. References
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub