What is parallel downloading?
In order to explain what parallel downloading is we first have to illustrate how a webage is rendered by a browser. When you type in the URL and press enter, the browser looks up the DNS for the site, connects to the webserver and requests the base HTML of the site. The browser downloads the file and then starts to parse the HTML. The browser starts to queue up the components of the page it needs to load and then finally begins to render the page.
Why do want my site to load in parallel ?
The major objective of website optimisation is to minimise the time spent downloading a webpage. One way to achieve this is to load as many components as possible in parallel. (without comprising performance!) The HTTP/1.1 Spec defines that browsers can download two files in parallel from a hostname.
As we move more towards the broadband era, we want to promote more parallel downloading to speed up the delivery of our web content.
Below I have included the download profile using IE 6.5 of two New Zealand websites to illustrate why parallel downloading is important.
Good – Parallel downloading
Here you can see the download profile of Trade Me Homepage. You can see that the images load in chunks of 4 at a time. This illustrates how you can much you speed up the loading of your page components.
Bad – Sequential downloading
How did I get my site to load in parallel?
- Analyse your current downloading pattern. Use Firebug or SiteTimer to show you how your page is loading. Look for what is loading in parallel and what is loading sequentially.
- Split your page components across multiple domains. ie. One for images, one for ad components. TIP: Create a domain alias for your site eg. for all your images eg. images.blah.com. The browser treats this as a new domain even though its referencing the same webserver.
Example: For ZoomIn maps – we use 4 domains for the map images, that means for a broadband connection the browser can load upto 8 images at a time.
Note: YSlow research shows that a total of 2-4 domains per page is optimal.