What exactly does a "persistent connection" mean?

Kevin Boyd picture Kevin Boyd · Sep 26, 2009 · Viewed 25.8k times · Source

I read about "HTTP persistent connection" but somehow I don't seem to understand what does persistent mean in this context.
Could you'll elaborate?

Answer

Alex Martelli picture Alex Martelli · Sep 26, 2009

It means the server doesn't close the socket once it's finished pushing out the response (so the length of the response has to be otherwise indicated, via headers or chunking), so the client can make other requests on the same socket. A web page often requests several other pieces (images, CSS, scripts, ...) on the same server as the page itself, so reusing the socket for some of those further requests to the same server can reduce overall latency compared to closing the original socket and opening new ones for all the follow-on requests.