14.11 Cookie
The HTTP protocol uses only the request and the immediate response to that request. It is not possible to keep a running session between the client and the server. It is not possible to keep any information between two requests to the server.
Netscape solved this problem by establishing a simple relation, during which it is possible to pass information from the server response to the subsequent request(s). The server writes a small piece of data called a cookie into its response. The Cooke is written in the Set-Cookie header line. The client repeats this cookie in the next request to this server in the Cooke header line. This creates a session that is not intended as a persistent TCP connection, but as a logical session created from ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access