Fundamentally, 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 (or some representative of the state) to theclient, 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).
To learn more about HTTP as a protocol, see http://www.w3.org/Protocols/
Http status codes :
1xx: Informational
2xx: Success
3xx: Redirection
4xx: Client Error
5xx: Server Error
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).
To learn more about HTTP as a protocol, see http://www.w3.org/Protocols/
Http status codes :
1xx: Informational
2xx: Success
3xx: Redirection
4xx: Client Error
5xx: Server Error
No comments:
Post a Comment