Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm serving up most of my static media from a CDN for my website. This includes images, videos, javascript files, and CSS files. YSlow and Google's Performance tool tell me that I should be gzip'ing this content. How can I gzip content served up by a CDN? Is there a way to store the content zipped on the CDN?

Would gzip'ing content from a CDN improve page load times? I don't care about the CDN bandwidth, but would be interested if it could actually load the page faster for the end user.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

It will have to depend on the CDN you are using. Some CDNs support on-the-fly gzip compression (same functionality that you would get from enabling gzip in Apache or nginx). Other CDNs do not support gzip (last time I checked, CloudFront did not for instance).

You could pre-gzip files but that's something you will have to try to see if your CDN properly supports it.

Keep in mind, the "faster" page load in this case is because of the reduction in data transfer. A slow browser/computer is still going to be slow regardless.

Lastly, you should not be gzipping images/videos. Those should already be compressed already due to the format and you would just be wasting CPU and bandwidth to compress them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.