cdnjs.com doesn't obey the Accept-Encoding header - it just serves everything gzipped. This is a limitation of CloudFront when backed by S3 - as of a few months ago it's possible to vary on the Accept-Encoding header through CloudFront but only if you run your own origin server rather than using S3.
The Google Ajax CDN varies on Accept-Encoding just fine.
We're looking into jumping ship to Rackspace once they complete their move to Akamai for Cloud Files (anticipated to be finished by the end of Q1 this year). It seems like they will support the Accept-Encoding header: http://news.ycombinator.com/item?id=2097491
Comments
cdnjs.com doesn't obey the Accept-Encoding header - it just serves everything gzipped. This is a limitation of CloudFront when backed by S3 - as of a few months ago it's possible to vary on the Accept-Encoding header through CloudFront but only if you run your own origin server rather than using S3.
The Google Ajax CDN varies on Accept-Encoding just fine.
That's a limitation we have to live with for now, unfortunately. We are looking into rectifying this.
You can fix it by running an nginx somewhere that serves the files, then setting your CloudFront distribution to point to that.
... of course, then you'll need to make sure the nginx server is properly redundant.
That is definitely one of our options.
We're looking into jumping ship to Rackspace once they complete their move to Akamai for Cloud Files (anticipated to be finished by the end of Q1 this year). It seems like they will support the Accept-Encoding header: http://news.ycombinator.com/item?id=2097491