AWS now supports gzipping files through CloudFront
I\'ve followed along with all of the instructions in Serving Compressed Files, and yet gzipping is not working.>
My problem was that I uploaded the files specifically with utf-8 encoding. From the documentation:
CloudFront determines whether the file is compressible:
The file must be of a type that CloudFront compresses.
The file size must be between 1,000 and 10,000,000 bytes.
The response must include a Content-Length header so CloudFront can determine whether the size of the file is in the range that CloudFront compresses. If the Content-Length header is missing, CloudFront won't compress the file.
The response must not include a Content-Encoding header.