How to serve parallel downloads from cPanel servers
In my other post, we setup Parallel Downloads to Optimize vBulletin 4. But since then I’ve had a few emails asking to cover only cpanel and more indepth of what exactly severing parallel downloads helps the page load. To understand parallel downloads is relatively simple, web sites have grown in size and complexity including numerous style sheets, javascript files, and images. Each file must be downloaded at some point, and each time they are a request is sent to your server. In the old days web servers couldn’t handle sending everything at once, and thats when browsers stepped in to help out. Browsers are hard coded to only download 2 requests at a time, for example if you have 100 files that need downloaded the browser will make 50 sequential requests to the server to get them, BAM BAM BAM BAM over and over again. This leads to a lot of over head and latency issues. They limited the 2 file limit per hostname (example.com)
By serving parallel downloads, you’re avoiding the latency involved with 50 sequental requests and if you’ve performed this to the fullest optimization you’re essentially turning it into 50 requests at one time eliminating the latency issue. To get around this we are going to create subdomains to serve the new image, javascript and css files from. This is a relatively easy process and even the most novice user can do it, if you know how to create a subdomain in cPanel then you can handle this.
First you need to organize everything properly, create folders for javascript, css and images. Stick each type of file in their respective folder, images go in the images folder and etc for proper parallelism of downloads.
After you’ve got your site organized properly login to cPanel and navigate to subdomains
Next in the subdomain box you can enter anything you want, but for organization and to easily recall what is going where I suggest naming your subdomain to match the name of your folder (ex: images.domain.com, css.domain.com)
Once you create subdomains for all your folders you need to update your paths for your respective site. Make all your images call from your images subdomain (images.domain.com) your CSS point to css.domain.com and so forth.
If you want an easy way to monitor and track how much of an improvement this makes, download Mozilla FireFox, Firebug and Google Pagespeed tool. If you need some great hosting that uses cPanel check out HostGator


