Hypertext Transfer Protocol
The World Wide Web (WWW) is one of the most commonly used services on the Internet. The Hypertext Transfer Protocol (HTTP) is a text-based application layer protocol that makes it work. All web browsers and web service applications use HTTP to communicate with each other over the Internet. A web browser or standalone application opens a connection and sends a request to the web server. The web server services the request and closes the connection to the web client.
Note
HTTP is a stateless protocol.
You cannot find any information about persistent connections in the HTTP 1.0 specification. However, in essence, it was unofficially added to an existing protocol via the following additional header to the request:
Connection: Keep-Alive
So, if a client supports Keep-Alive
, it adds the preceding header to his request. A server receives this request and generates a response includes this header.
Starting from HTTP 1.1, all the connections are considered persistent unless...