WebPagetest Forums
Avoid DNS lookups by linking to IP address? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: Avoid DNS lookups by linking to IP address? (/showthread.php?tid=730)



Avoid DNS lookups by linking to IP address? - Darren Slatten - 05-09-2011 11:07 AM

I set up a bunch of subdomains for serving static resources (e.g., img.domain.com, css.domain.com, js.domain.com), thinking that it would allow for more simultaneous connections--since older browsers default to a 2-connection limit per domain.

However, according to the waterfall view, each subdomain requires its own DNS lookup, which basically negates the benefits that the additional connections were supposed to provide.

This got me thinking... What if I linked directly to the IP addresses of my static resources? Would this remove the delays caused by DNS lookups?

Has anybody tried something like this...and if so, what was the result?


RE: Avoid DNS lookups by linking to IP address? - pmeenan - 05-09-2011 11:34 PM

Yes, using the IPs will eliminate the DNS lookups but it also means you need unique IP's for each of the resource domains.

Not sure what your usage pattern looks like but at least according to StatsCounter, IE6 and 7 add up to only about 11% of the market now. I'm not sure domain sharding is really worth it at this point.