Saturday, March 24, 2012

Is http stateful or stateless?

HTTP as a protocol is stateless. In general, though, a stateless protocol can be made to act as if it were stateful, assuming you've got help from the client
This happens by arranging for the server to send the state to the client, and for the client to send it back again next time
There are three ways this happens in HTTP.
One is cookies, in which case the state is sent and returned in HTTP headers
The second is URL rewriting, in which case the state is sent as part of the response and returned as part of the request URI
The third is hidden form fields, in which the state is sent to the client as part of the response, and returned to the server as part of a form's data
(which can be in the request URI or the POST body, depending on the form's method).

Reference:
http://www.velocityreviews.com/forums/t149832-is-http-stateful-or-stateless.html

Introduction to HTTP Preview
http://www.youtube.com/watch?v=xpBpGC08f4Q

Lesson: Hypertext Transport Protocol Overview (HTTP) - Part 1
http://www.youtube.com/watch?v=iySa4zBYScE

No comments:

Post a Comment