Minimize DNS Lookups
For viewing all tips see here
Applicable To
All Browsers
How Improves Page Load Time
o By optimizing network latency
Prologue
Before a browser can establish a network connection to a web server, it must resolve the DNS name of the web server to IP address. If the DNS resolution has already been performed then it can be resolved from Browser / OS cache else it needs to be looked over the network using DNS server(s)
Why
o To minimize time taken during DNS name resolution
o Reusing domains allows the browser to reuse TCP connections more frequently, further reducing the network time
How
o Use URL paths instead of host names wherever possible. For example, instead of hosting developer site on developer.rootDomain.com, host it on www.rootDomain.com/developer
o Use URL paths instead of host names wherever possible. For example, instead of hosting developer site on developer.rootDomain.com, host it on www.rootDomain.com/developer
Exceptions
o There are benefits also from using multiple hostnames to induce parallel downloads. See Tip {TODO}.
Recommendations
o Between 1 and 5 hosts, where 1 main host and rest of the hosts (not counting external hosts, such as ads) for parallelizing static resources like images, java scripts, style sheets etc.
o Shouldn't use more than one host for fewer than 6 resources and fewer than 2 resources on single host is especially wasteful
Comments
Post a Comment