What are keepalives?
TL;DR
The default HTTP connection is usually closed after each request has been completed, meaning that the server closes the TCP connection after delivering the response. In order to keep the connection open for multiple requests, the keep-alive connection header can be used. All modern browsers use persistent connections as long as the server is willing to cooperate. You may also use HTTP/1.1, where Keep-Alive is implemented differently and the connections are kept open by default unless the response contains a “Connection: close” header.
Read more Details