Monday, May 4, 2015

Session


HTTP protocol and Web Servers are stateless, what it means is that for web server every request is a new request to process and they can’t identify if it’s coming from client that has been sending request
previously.
But sometimes in web applications, we should know who the client is and process the request
accordingly. For example, a shopping cart application should know who is sending the request to add an item and in which cart the item has to be added or who is sending checkout request so that it can charge the amount to correct client.
Session is a conversional state between client and server and it can consists of multiple request and
response between client and server. Since HTTP and Web Server both are stateless, the only way to
maintain a session is when some unique information about the session (session id) is passed between
server and client in every request and response.
There are several ways through which we can provide unique identifier in request and response.

No comments:

Post a Comment

Contact Form

Name

Email *

Message *