I noticed that on the web some sites have subdomains dedicated to images or information on sub-domains such as i.domain.com. I was wondering what is the advantage of this? Is there a name for this type of "Method"? Where can I get more information on this? Thanks.
Parallel-izing image/script downloads.
Some browsers will only have 2 concurrent connections open to a given domain at a time. If you have 20 images/scripts to download you can only get 2 at a time x10. If you use different domains (subdomains) you can increase the amount of concurrent downloads.
As an example StackOverflow puts images under i.stackoverflow.com to help with speed.
EDIT
As noted by Richard (in a comment) that the HTTP spec strongly advises a 2 concurrent connection limit.
‘i.’ is often used for images for the reason explained by Chad. There is a little bit more to it, in that having the images under ‘i.’ allows a few more requests to come from the main domain without the images interfering.
In particular, every time you include an external <script>(*), the browser has to block rendering of the rest of the page under the script until the script file has been fetched and executed. If there are twenty images above the script element, those will all be queued up already and may be fetched before the script element, causing a big delay in rendering the page.
With a different hostname (even within the same domain) for important resources like the scripts, image requests won't clog up the pipeline for more important stylesheet and script resources; instead they will happen in parallel.
Plus of course by using a different hostname for images and other large resources like video files, you can kick those off onto a second server in the future.
(*: unless you use <script defer>, but that's rarely used and not globally supported.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With