Cloudfront Compress Objects Automatically


(Drew Friestedt) #1

I’m working through google pagespeed items.

Google is telling me I need to enable compression:
“Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.”

Is there any reason I should NOT enable compression on cloudfront by selecting YES to Compress Objects Automatically?

I read here on the forum that compression should be handled elsewhere, but I have not changed any settings that would impact built in compression handled by Discourse.

I’m updating this with additional research. I did find this post that is pretty much the same issue:

I tested if my js assets are getting compressed by going here as recommended:
http://www.whatsmyip.org/http-compression-test/

I tested an asset and it came back as uncompressed:
https://deexadsk18i10.cloudfront.net/assets/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js

I’m also seeing this in the headers of assets served from the CDN:
x-cache:Miss from cloudfront

I’m using the std docker installation with no modifications, proxy, or anything in front of the docker. I’m only using cloudfront for the CDN.