SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A subdomain for CSS and images

    I'm working in a multilingual site with different domains (mysite,com, mysite,com,mx, mysite,co,jp, etc.) and the only thing that change is the text, same html structure, images and css. So I was thinking in the best way to target the css and images to the differents domains, I guess a assets subdomain on the main site (a,mysite,com)

    So if I use a subdomain to put the CSS file and images to target 2 different domains, This affect the load time of the site or is irrelevant?

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    No it would not affect the load time, not unless people were navigating between the bi-lingual sites (in which the cached contents would be used).

    PS: If all the domains direct to the same website why not just use relative links?

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,322
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    i read o'reilly's website optimization book a little while ago http://www.amazon.com/Website-Optimi.../dp/0596515081 and from memory of that i'd say what you're describing can effect dl time. my memory is a bit hazy and i remember being a bit confused on it while reading it because there seemed to be contradictory things... hosting various web page resources on different domains (what you're describing aren't subdomains right?, but different domains which just happen to have the same name bit) is used as a strategy to speed up access, but also there seemed to be a slow down because of it (hence me not fully understanding/contradiction).

    speed up aspect: there's two main http access protocols, 1 and 1.1 i think. one of them enforces, or at least usually uses, a maximum of four connections at the same time per domain. so a browser accessing a page may suffer from blocking. hosting different page files on different domains gets round that problem.

    slow down aspect: more dns lookups

    as i say my memory's hazy and i didn't fully get the details at the time. maybe worth having a look at that book if it's quite important to you. there was also stuff about a persistant connection rather than multiple small conenctions which may come into it.

  4. #4
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for you're answers, I follow AlexDawson's advice to use relative links to the css and images because all domains are in the same server, I just put the css and images in one folder and I target the differents domains to that same folder.

    Thanks, problem solved


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •