Hacker News new | ask | show | jobs
by thezilch 5634 days ago
Using AWS CloudFront's Custom Origins, the Accept-Encoding header is passed and cached separately on the same filename.

$ curl -I http://statics.sodahead.com/js/generated/sodahead/utils/main... HTTP/1.0 200 OK Date: Wed, 12 Jan 2011 04:34:51 GMT Server: Apache/2.2.11 (Unix) Last-Modified: Wed, 12 Jan 2011 02:11:26 GMT ETag: "14d09-4999cb7e48f80" Accept-Ranges: bytes Content-Length: 85257 Cache-Control: max-age=5184000 Expires: Sun, 13 Mar 2011 04:34:51 GMT Content-Type: application/javascript X-Cache-Lookup: HIT from images.sodahead.com:80 Vary: Accept-Encoding Age: 53417 X-Cache: Hit from cloudfront X-Amz-Cf-Id: 493c86c13ceff5001d1a55c596153dca84009e4f34c67a565fd329760f8418f6b3fc35d1ac2980cb Via: 1.1 squid.wap-lax-106.sodahead.com:80 (squid/2.7.STABLE7), 1.0 b67f54b549c6579a21be3a5a67642d7a.cloudfront.net:11180 (CloudFront), 1.0 cc184e2737613cc16ea7b900e5384df1.cloudfront.net:11180 (CloudFront) Connection: close

$ curl -I --compressed http://statics.sodahead.com/js/generated/sodahead/utils/main... HTTP/1.0 200 OK Date: Wed, 12 Jan 2011 04:34:37 GMT Server: Apache/2.2.11 (Unix) Last-Modified: Wed, 12 Jan 2011 02:11:26 GMT ETag: "14d09-4999cb7e48f80"-gzip Accept-Ranges: bytes Cache-Control: max-age=5184000 Expires: Sun, 13 Mar 2011 04:34:37 GMT Content-Encoding: gzip Content-Length: 26799 Content-Type: application/javascript X-Cache-Lookup: HIT from images.sodahead.com:80 X-Cache-Lookup: MISS from images.sodahead.com:80 Vary: Accept-Encoding Age: 53439 X-Cache: Hit from cloudfront X-Amz-Cf-Id: e1c3dc2910370a51bdd8ffb9b590cbdd4c7e4f155d381b3783c09649b7cd2b8517eb2746e2d783ed Via: 1.1 squid.wap-lax-106.sodahead.com:80 (squid/2.7.STABLE7), 1.0 squid.wap-lax-104.sodahead.com:80 (squid/2.7.STABLE7), 1.0 b67f54b549c6579a21be3a5a67642d7a.cloudfront.net:11180 (CloudFront), 1.0 107edf28374a08a9e88792cfd1fdd16b.cloudfront.net:11180 (CloudFront) Connection: close