Jump to content

whats the point??


dreamwest

Recommended Posts

whats the point of using subdomains for images, js etc when you can use .htaccess to cache images

 

just seems like less work to add:

 

<FilesMatch "\.(jpg|jpeg|gif|ico)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

 

instead of creating multiple subdomains

Link to comment
Share on other sites

caching doesn't affect the first loading of those files though. the reason for a subdomain is that a browser will limit the number of connections to a host (i think it's around 3). By having files spread out over subdomains, you can have that many connections per subdomain, leading to a faster page load.

Link to comment
Share on other sites

To piggyback on thorpe's post, sometimes subdomains not only point to different hardware servers but different software servers too.

 

For example, lighthttpd is used sometimes for serving just static content.  The overhead of one request on lighthttpd can be 1/10 of the size of one under Apache with some modules loaded.  A couple of big sites use this method, but I can't remember any off the top of my head x.x.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.