Persistent connections

Persistent connections between a web client and a server can be reused for more than one exchange of a request and a response.

Persistent connections improve network performance because a new connection does not have to be established for each request. Establishing a new connection consumes significant additional network resources compared to making a request using an existing connection.

In HTTP/1.0, the default action for the server was to close the connection when it had received a request from the web client and sent a response. If the web client wanted the server to keep the connection open, it had to send a Connection: Keep-Alive header on the request.

For HTTP/1.1, persistent connections are the default. When a connection is made between a web client and a server, the server keeps the connection open by default. The connection is closed only if the web client requests closure by sending a Connection: close header, if the server timeout setting is reached, or if the server encounters an error.