Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does http keep-alive work?
    text
    copied!<blockquote> <p>Keep-alives were added to HTTP to basically reduce the significant overhead of rapidly creating and closing socket connections for each new request. The following is a summary of how it works within HTTP 1.0 and 1.1:</p> <p>HTTP 1.0 The HTTP 1.0 specification does not really delve into how Keep-Alive should work. Basically, browsers that support Keep-Alive appends an additional header to the request as:</p> <p>Connection: Keep-Alive When the server processes the request and generates a response, it also adds a header to the response: Connection: Keep-Alive When this is done, the socket connection is not closed as before, but kept open after sending the response. When the client sends another request, it reuses the same connection. The connection will continue to be reused until either the client or the server decides that the conversation is over, and one of them drops the connection.</p> </blockquote> <p>The above explanation <a href="http://www.jguru.com/faq/view.jsp?EID=704228" rel="noreferrer">comes from here</a>. But I don't understand one thing </p> <blockquote> <p>When this is done, the socket connection is not closed as before, but kept open after sending the response.</p> </blockquote> <p>As I understand we just send tcp packets to make requests and responses, how this <code>socket connection</code> helps and how does it work? We still have to send packets, but how can it somehow establish the persistent connection? It seems so unreal.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload