s3_website icon indicating copy to clipboard operation
s3_website copied to clipboard

Native Gzip Compression Support for Amazon CloudFront

Open sparanoid opened this issue 9 years ago • 1 comments

Now CloudFront has built-in Gzip support: https://aws.amazon.com/blogs/aws/new-gzip-compression-support-for-amazon-cloudfront/

I think now we can simply use some options like this:

cloudfront_distribution_config:
  compress: true

sparanoid avatar Dec 19 '15 03:12 sparanoid

I wouldn't take away the existing support though, as there are some downsides to Amazon's builtin compression, like not being able to customise what file types are compressed, and the following:

If you configure CloudFront to compress content, CloudFront removes the ETag response header from the files that it compresses... As a result, when a compressed file expires and CloudFront forwards another request to your origin, your origin always returns the file to CloudFront instead of an HTTP status code 304 (Not Modified). (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html)

Can still add the option though.

code-tree avatar Jul 31 '16 10:07 code-tree