Client-side Performance Tip

I wanted to mention this for a while, but only now found a bit of time. This is very important.

When a page loads, it first processes all child elements in the head element of the page. Until all child elements are processed, no rendering of the page will occur. So, first important bit of information is: the page won’t start showing anything until all script and link elements in its head are requested and loaded.

Conforming to RFC2616, all user agents (including Firefox, IE, Opera, and Safari) will only make 2 HTTP requests at a time to load all external assets for the page. Which means that this is not a parallel operation, and regardless of how fast the server is, the visible performance of the page will suffer if there are lots of scripts and links declared in the head element of the page. So, the performance tip is: at all costs, minimize the number of items in the head element of the page.

Leave a Reply