Will a separate domain for images improve loading times?

LPH

Well-known member
My host allows subdirectories to be loaded as subdomains. For example the subdirectory /images can also be loaded as images.domain.com ....

Would performance improve if the header of the site was loaded from images.domain.com versus /images ?

I ask after listening to a web performance presentation in which the presenter suggested loading content in parallel helps. Every ms helps.

What do you think? Would adding images from a separate domain improve performance?
 
Probably, browsers limit the number of active requests by each domain. So it won't load more than X number of things at a time on the same domain (connections are throttled). By using a separate domain you can double the number of allowed requests at a time, which can speed up loading.

Also, if your site is on a subdomain (like www) it will not send your forum's cookies when requesting the images, which can have a (probably tiny) positive impact on performance.
 
It would need to be a completely different domain to download content "in parallel", browsers still consider subdomains part of the same domain.
 
Please clarify for me.

It would need to be a completely different domain to download content "in parallel", browsers still consider subdomains part of the same domain.

What if there is mapping being done and the domains are really all the same files ... then does this hold true?

In other words, Can I use a domain that is just parked on that server (a .net which rolls over to .com)?

For example, tuxreports.net rolls to .com ... then can I use the images.tuxreports.net ?
 
Also, if your site is on a subdomain (like www) it will not send your forum's cookies when requesting the images, which can have a (probably tiny) positive impact on performance.

Thank you. I'll have to figure out how that would work ...
 
It would need to be a completely different domain to download content "in parallel", browsers still consider subdomains part of the same domain.
I don't believe that's entirely correct.. do you have a source?
http://stackoverflow.com/questions/...load-two-components-in-parallel-per-subdomain

Though a completely different domain would be wise if your site is not accessible strictly via subdomain (for the cookie thing I mentioned).

Thank you. I'll have to figure out how that would work ...
Either redirect www.yoursite.com/anything to yoursite.com/anything or vice versa.
If you use www, you could use images.yoursite.com. If you don't, you'd have to use a completely different domain.
 
Top Bottom