HTTP and Sessions The HTTP protocol is connectionless That is,once the server replies to a request,the server closes the connection with the client,and forgets all about the request In contrast,Unix logins,and JDBC/ODBC connections stay connected until the client disconnects retaining user authentication and other information Motivation:reduces load on server operating systems have tight limits on number of open connections on a machine Information services need session information E.g.user authentication should be done only once per session Solution:use a cookie Database System Concepts-5th Edition,Oct 23,2006. 8.17 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.17 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. HTTP and Sessions The HTTP protocol is connectionless That is, once the server replies to a request, the server closes the connection with the client, and forgets all about the request In contrast, Unix logins, and JDBC/ODBC connections stay connected until the client disconnects retaining user authentication and other information Motivation: reduces load on server operating systems have tight limits on number of open connections on a machine Information services need session information E.g. user authentication should be done only once per session Solution: use a cookie
Sessions and Cookies A cookie is a small piece of text containing identifying information Sent by server to browser on first interaction Sent by browser to the server that created the cookie on further interactions part of the HTTP protocol Server saves information about cookies it issued,and can use it when serving a request E.g.,authentication information,and user preferences Cookies can be stored permanently or for a limited time Database System Concepts-5th Edition,Oct 23,2006. 8.18 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.18 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Sessions and Cookies A cookie is a small piece of text containing identifying information Sent by server to browser on first interaction Sent by browser to the server that created the cookie on further interactions part of the HTTP protocol Server saves information about cookies it issued, and can use it when serving a request E.g., authentication information, and user preferences Cookies can be stored permanently or for a limited time