Can someone explain TCP Preconnect? My Google-fu has failed me - I understand that DNS prefetching is when Chrome notices that there are links to other domains so it resolves the IP addresses of those domains ahead of time so that their pages will load slightly faster if the user clicks on them. But I'm not clear about TCP preconnecting; are they literally downloading the contents of those pages in advance? Or are they merely opening a connection to the server in case you click on the link so that they'll be able to send the HTTP request slightly faster?
Can someone explain TCP Preconnect? My Google-fu has failed me - I understand that DNS prefetching is when Chrome notices that there are links to other domains so it resolves the IP addresses of those domains ahead of time so that their pages will load slightly faster if the user clicks on them. But I'm not clear about TCP preconnecting; are they literally downloading the contents of those pages in advance? Or are they merely opening a connection to the server in case you click on the link so that they'll be able to send the HTTP request slightly faster?
EDIT: I eventually found a link to http://code.google.com/p/chromium/issues/detail?id=42694 which indicates that Chrome does indeed open connections to servers and doesn't immediately send an HTTP request, leaving those connections open in case we do need to send HTTP requests.
As you found in the code above.. the idea is simply to complete the TCP handshake and keep the connection idle until the request is ready to be dispatched. Doing so allows Chrome to shave off one RTT (TCP handshake) of latency.
Can someone explain TCP Preconnect? My Google-fu has failed me - I understand that DNS prefetching is when Chrome notices that there are links to other domains so it resolves the IP addresses of those domains ahead of time so that their pages will load slightly faster if the user clicks on them. But I'm not clear about TCP preconnecting; are they literally downloading the contents of those pages in advance? Or are they merely opening a connection to the server in case you click on the link so that they'll be able to send the HTTP request slightly faster?
EDIT: I eventually found a link to http://code.google.com/p/chromium/issues/detail?id=42694 which indicates that Chrome does indeed open connections to servers and doesn't immediately send an HTTP request, leaving those connections open in case we do need to send HTTP requests.