1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Will a separate domain for images improve loading times?

Discussion in 'Off Topic' started by LPH, Nov 11, 2012.

  1. LPH

    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?
  2. Jeremy P

    Jeremy P Well-Known Member

    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.
  3. rollthebones

    rollthebones Active Member

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

    LPH Well-Known Member

    Please clarify for me.

    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 ?
  5. LPH

    LPH Well-Known Member

    Thank you. I'll have to figure out how that would work ...
  6. Jeremy P

    Jeremy P Well-Known Member

    I don't believe that's entirely correct.. do you have a source?

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

    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.
  7. CyclingTribe

    CyclingTribe Well-Known Member

    I do this; in Apache I have a separate alias "img.domain.net" and load images and other static content from it.

Share This Page