3 ms·
I can see how that might help if you're using an unreliable network with significant packet loss, such as a mobile connection, but how does it reduce the number
by Silhouette 11y ago
I can see how that might help if you're using an unreliable network with significant packet loss, such as a mobile connection, but how does it reduce the number of round-trips? You're still sending the same number of requests and presumably getting equivalent responses, so at HTTP level it makes no difference. Are you talking about something at a lower level, perhaps the TCP level mechanics for retransmission of dropped packets?
- aidenn0 11y agoHere is what a TCP connection looks like when it is first opened[1] If the entire GET request fits into pkt0 then there is a noticeable improvement in round-trips. 1: http://www.isi.edu/nsnam/DIRECTED_RESEARCH/DR_WANIDA/DR/images/slow-start-1.jpg http://www.isi.edu/nsnam/DIRECTED_RESEARCH/DR_WANIDA/DR/imag...
- Silhouette 11y agoSo you're talking about TCP slow start here? In that case, yes, I agree that in theory compressing the headers is potentially useful, though for a well-organised site I wouldn't expect it to make much difference in practice. You do have to try quite hard (or be careless with things like cookies) to get the size of a single request above the MTU for typical Internet usage. Chances are that in practice you are going to be requesting an HTML resource first, then probably prioritising some CSS, then JS, and then other resources like image or multimedia content. And for the responses in each case, the size will usually be dominated by the payload rather than the headers anyway. So it seems likely that in such an environment you'll be more limited initially by the response time for the HTML and the main CSS resources anyway, or by general packet loss on an unreliable network. By the time you've got those initial resources, parsed them, and started requesting the supporting content, you've probably warmed up the TCP connection enough for slow start not to make much difference any more. Beyond that point, effects like multiplexing, prioritisation and server push seem to have more potential for increasing real world performance by reducing or eliminating certain round-trips at the HTTP layer. (This assumes that the browser and server do actually take full advantage of these new options; there seems very little discussion so far about how we might achieve this in general.)