

Chrome Networking: DNS Prefetch & TCP Preconnect - igrigorik
http://www.igvita.com/2012/06/04/chrome-networking-dns-prefetch-and-tcp-preconnect/

======
crazygringo
This is actually quite fascinating. The lengths the Chrome team is going to,
in the name of page-rendering speed, is really astonishing.

------
vardump
This got me thinking...

When TLS, cookies or same origin policy are not a concern, why not resolve
resource domains on the server side and output for example <img
src="hxxp://10.0.0.1/picture.jpg"> to avoid that extra client side DNS request
completely?

~~~
igrigorik
Yup, we can do that too! I didn't mention it in the writeup, but you can also
insert <link rel="dns-prefetch"
href="[http://www.domain.com/>](http://www.domain.com/>); hints into the head
of the document to tell the browser to pre-resolve certain domains.

An often overlooked reason for supporting this is to pre-resolve hostnames
behind a redirect. If you have a "<http://a.com/resource>, which redirects to
"<http://b.com/resource>, and you know this relationship while you're
generating the page, then injecting a dns-prefetch link can help hide the cost
of the extra DNS lookup when the browser is following the 3xx.

~~~
mike-cardwell
DNS pre-fetching is a great way for spammers to determine whether or not an
email has been read when the recipient is using webmail with a browser which
supports it. Although, I believe DNS pre-fetching is disabled over https by
default on all current browsers which support it.

EDIT: This is one of the things that a website I developed tests for:
<https://emailprivacytester.com/>

