nprapps / interactive-template

A Node-based template for starting news apps and interactive pages
MIT License
62 stars 20 forks source link

Remove the gzip stage from S3 uploads #21

Closed thomaswilburn closed 3 years ago

thomaswilburn commented 4 years ago

Apparently they do this for us now?

thomaswilburn commented 4 years ago

Note we should evaluate based on filetype-we have some oddballs that it may make sense to keep manually gzipped. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types

thomaswilburn commented 3 years ago

Apparently (according to testing at the LAT), CloudFront compression removes the Content-Length and ETag headers from responses. Since we use the latter extensively for avoiding unnecessary bandwidth in unchanged response polling (e.g., election data), we should not rely on CloudFront's compression.