Forums Register Login

why http stateless?

+Pie Number of slices to send: Send

why http is stateless protocol.......
2
+Pie Number of slices to send: Send
A stateless protocol is more efficient than a stateful protocol. In a stateful protocol, (like TCP/FTP) the "connection" has to be open to keep the state. Each open connection costs resources on the server. Remember, that HTTP was really designed to serve up static files very efficiently. Having dynamic pages that are computer generated is something that was bolted on to HTTP. Dynamic pages require state, static pages don't.
1
+Pie Number of slices to send: Send
It's stateless because there is no information stored in the HTTP server from one request to the next. That's simply the definition of "stateless".
+Pie Number of slices to send: Send


i know.....i asked why http is stateless why not stateful ...we can also convert from stateless to stateful(session tracking)..

what's reason ....
+Pie Number of slices to send: Send
Jayesh and Paul already answered your question. What more are you looking for?
1
+Pie Number of slices to send: Send
To tell the truth, I only guessed at the question because I didn't really understand what it meant.

Here's an analogy. Question: "Why do we wear shoes on our feet?"

There's nothing wrong with the question in terms of grammar, but what is it asking about? It might be asking "Why do we wear shoes on our feet instead of on our hands?" Or it might be asking "Why do we wear shoes, and not glasses, on our feet?" Or it might be asking "Why do we wear shoes on our feet instead of nothing?" Sure, you might say that some of those interpretations are ridiculous because we all know what shoes and feet are. But when you translate it to a context where we're talking about protocols and state, where the person asking the question might not know what those things are, all of the possible meanings come into play, no matter how ridiculous they may seem to somebody who does know what they are.
+Pie Number of slices to send: Send
Here's another possible answer: HTTP is a stateless protocol because the designers of HTTP decided it should be one.
1
+Pie Number of slices to send: Send
 

Jayesh A Lalwani wrote:A stateless protocol is more efficient than a stateful protocol. In a stateful protocol, (like TCP/FTP) the "connection" has to be open to keep the state. Each open connection costs resources on the server. Remember, that HTTP was really designed to serve up static files very efficiently. Having dynamic pages that are computer generated is something that was bolted on to HTTP. Dynamic pages require state, static pages don't.



i see that you are saying that STATEFUL PROTOCOL , THE CONNECTION HAS TO BE OPEN. so that means in stateless protocol like http connection IS NOT KEPT OPEN. but i have read that in http 1.1 we have something called PERSISTENT CONNECTIONS, which keeps the connection alive. so is http statefull ?
The City calls upon her steadfast protectors. Now for a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 6138 times.
Similar Threads
is HTTP "connection-less" or "connection-based" for SCEA Exam??
What does stateless mean ?
HTTP help
HTTP is connection-less or connection-base? my materials tell me difference answer:(
EJB question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:24:07.