Why Use Session Management?
Session management is a means by which a user’s identity can be preserved between requests. Session management in a Web environment works by passing an identifier to the user with a response, and then having the user pass back that identifier with subsequent requests to keep track of his session. This identifier can then be used to correlate the user with information relating to his activity. For example, if the user is shopping on your site, you can keep track of all of the items he’s placed in his shopping basket using session management.
As you’ve already learned, HTTP is a connectionless protocol. When a user requests a Web page, the server sends the page and forgets that the browser ever asked. If a Web site ...
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