Is HTTP Stateful or Stateless?

G

Guest

Hi...All,

Is HTTP stateful or Stateless? Also, it would be really great is you
please do let me know where can I find more details regarding HTTP protocol?

Regards,

P
 
C

Chris Smith

nospam said:
Is HTTP stateful or Stateless? Also, it would be really great is you
please do let me know where can I find more details regarding HTTP protocol?

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 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).

To learn more about HTTP as a protocol, see http://www.w3.org/Protocols/

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
G

Guillaume

nospam
Is HTTP stateful or Stateless? Also, it would be really great is you
please do let me know where can I find more details regarding HTTP
protocol?

HTTP is known to be stateless.
However, with the use of cookies, ability to keep connections open and
to pass arbitrary amount of data, we're not far from a statefull
protocol. Sessions make it appeared as statefull.
 
A

Andy Dingley

Is HTTP stateful or Stateless?

Stateless.

This is a damn nuisance for many "shopping basket" and similar
applications, so much work goes on to make some add-on to HTTP look as
if it's stateful. Usually this involves cookies, sometimes URL munging
instead.

There's also a very minor way ("persistent connections") in which some
pedant could argue that HTTP is stateful -- but this is just a
performance speed-up tweak, it's not a useful "state" for any sensible
meaning.
Also, it would be really great is you
please do let me know where can I find more details regarding HTTP protocol?

Docs are in the RFC here
ftp://ftp.isi.edu/in-notes/rfc2616.txt
(think this is current - some minor searching will confirm)

As for advice on how to use HTTP, then any primer on simple web back-end
programming shoudl assist you -- any language, not just Java.
 
H

Hal Rosser

nospam said:
Hi...All,

Is HTTP stateful or Stateless? Also, it would be really great is you
please do let me know where can I find more details regarding HTTP protocol?

Regards,

As the others said - Stateless.
Web pages are served up in response to a http request.
Data can be sent with the http request - and used by the server to retreive
data for presentation and returned to the user in a http response.
You can learn more by googling and reading tutorials on such things as
'asp', jsp', 'cgi' and 'php' amoung others.
 
R

Roedy Green

Is HTTP stateful or Stateless? Also, it would be really great is you
please do let me know where can I find more details regarding HTTP protocol?

the server remembers nothing. the client can send cookies to remind it
of the state.

There is this business of keep-alive where you reuse the same socket
which in some sense is state.

See http://mindprod.com/jgloss/http.html

IIRC I link to some RFCs.
 
Joined
Feb 24, 2011
Messages
1
Reaction score
0
HTTP stateless or stateful

HTTP is a stateless protocol,in other word it does not require the sever to maintain any protocol state. Easy line - The server forgets everything about from the client.
Ad ons have made it virtually appear to be stateful through the use of cookies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top