Ben
Ben

Reputation: 62444

Hosting static images on subdomain

What are the benefits of hosting your images on a subdomain such as "img.domain.com"? If you're not on a CDN is there any real benefit to this?

Update

So doing this with CSS and JS files would also serve the same purpose?

Upvotes: 5

Views: 1755

Answers (2)

CodeJoust
CodeJoust

Reputation: 3800

It can trick browsers to download with more 'pipes' of bandwidth. Say, the maximum of same downloads on a domain was three, hosting the images on another subdomain would effectively increase that to six.

The browser also doesn't have to send and receive cookies in the header, so it will go faster in that regard also.

Upvotes: 11

Cullen Walsh
Cullen Walsh

Reputation: 4388

You can direct the subdomain to a different server, that is running a lighter weight web daemon such as nginx or lighthttpd. Then, you are not burdening the main, number crunching server with all the extra requests for static images.

Upvotes: 5

Related Questions