Java Servlets   «Prev 

HTTP is stateless

What is HTTP?

The Hypertext Transfer Protocol (HTTP) is the protocol programs use to communicate over the World Wide Web. There are many applications of HTTP, but HTTP is most famous for two-way conversation between web browsers and web servers. HTTP began as a simple protocol and I am careful to explain the why of HTTP, not just the "how". And to save you time chasing references, we explain many of the critical non-HTTP technologies that are required to make HTTP applications work. You can find the alphabetical header reference (which forms the basis of most conventional HTTP texts) in a conveniently organized appendix. We hope this conceptual design makes it easy for you to work with HTTP.
This website is written for anyone who wants to understand HTTP and the underlying architecture of the Web. Software and hardware engineers can use this site as a coherent reference for HTTP and related web technologies. Systems architects and network administrators can use this site to better understand how to design, deploy, and manage complicated web architectures. Performance engineers and analysts can benefit from the sections on caching and performance optimization.


How does HTTP work?

If you are wondering why HTTP works this way, it has to do with the unpredictability of users.
While a user is looking at my main Welcome page they are quite likely to follow a link to RelationalDBDesign link.
The user is just as likely to type in a URL for yahoo.com, or follow a bookmark to a search engine. If a Web server keeps a connection open, waiting for another request, that request might never come.
The browsers would have to send You can hang up, my user has gone elsewhere messages to the server.
Servers would be completely consumed by maintaining unused connections.
This is wasteful in a world where users do not stay very long at each Web site.