What does setting the connection header to keep alive do. I'm noticing, setting it to close makes a faster connection than keep alive by approx. 150 ms on average, when reading the html content on a given site. Why? Why do browsers generally send keep alive headers?
Asked
Active
Viewed 1,960 times
2
-
See http://en.wikipedia.org/wiki/Keepalive – home Oct 30 '12 at 06:05
-
whats the point of a browser sending it, and how would java make use of it in an httpurlconnection? – Sam Adamsh Oct 30 '12 at 06:07
-
See the link forwarding to HTTP persistent connections: http://en.wikipedia.org/wiki/HTTP_persistent_connection – home Oct 30 '12 at 06:09
-
1And this: http://stackoverflow.com/questions/3304006/persistent-httpurlconnection-in-java – home Oct 30 '12 at 06:11
-
google chrome visits google.com, sending keep alive header. Now the user cliks news at the top. what did that keep alive do? Also, java keep alive header is set, and connection opened to http://www.google.com, then the connection is not closed. how would you visit google.com?q=oiu on the same connection? – Sam Adamsh Oct 30 '12 at 06:12