Vijay Kumbhar
Vijay Kumbhar

Reputation: 916

Serve static content from other subdomain

Is it a good practise to keep the static content to be served from another subdomain instead of the same? as web server serves the request and the content with that request, now one web server will only handle the request and if we create another server instance with another web server to only server the static content, will this help to increase the application performance? Of Course the static content like css,js are minified and compressed, images are also optimised. As I want to create own static content server only. So can anybody suggest a good way of handling this?

Upvotes: 0

Views: 790

Answers (1)

Tantowi Mustofa
Tantowi Mustofa

Reputation: 687

yes, it's a good practice. Some benefits are

  1. reduced request size, because clients don't need to send the cookies generated by the web server on the main domain.
  2. double the number of parallel download the clients can perform.
  3. can use lightweight web server for static content.
  4. can store the static content on CDN.

Upvotes: 1

Related Questions