Avoid DNS lookups by linking to IP address?

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?

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.