Minimize DNS Lookup in the “Critical Path”

For viewing all tips see here

Applicable To
All Browsers


How Improves Page Load Time
By optimizing network latency


Prologue
Browser needs to perform lots of activities before it can start rendering the page.  It needs to resolve the DNS name, make TCP connections, download response data etc.  Most of modern browsers are capable of doing progressive rendering and would be fast if minimal activities need to be performed on start.

‘Critical Path’ can be defined as code and resources that are required for initial rendering of the HTML document


Why
Most browsers block other downloads and rendering while external java script file is being downloaded, parsed and executed.  Adding DNS lookup time to this process further delay the page load time


How
Serve early loaded external java script files (e.g. from document head / early document body) from the same hostname as the main document.  If it is not possible to serve from the same hostname then defer their loading.  See Tip xxx.


Exceptions
If the external java script files are being shared from pages served from different hostnames then ‘HTTP Caching’ (See Tip xxx) might outweigh the DNS lookup overhead


Recommendations
None

Comments

Popular posts from this blog

Performance Test Run Report Template

Understanding Blockchain

Bugs Management in Agile Project