The discussion revolves around enabling compression for a website’s files to improve Google Speed Test results. The website, https://discuss.endurancelab.fit, uses Cloudfront as its CDN and is not compressing certain files, unlike https://meta.discourse.org. dfriestedt seeks advice on how to enable compression. mpalmer suggests asking Cloudfront, while schungx recommends checking the CDN’s compression settings. sam identifies the issue with a CSS file and later finds a solution by enabling gzip_proxied: any in the Discourse template, overriding NGINX’s default behavior of not serving gzipped content to CDNs with a Via header. This fix resolves the compression issue, and sam confirms the solution.
So meta.discourse.org is compressing the files that my site is not. I’m using cloudfront for my CDN. Any thoughts on how to get these files compressed?
OK - will do. In order to formulate my question to them, is there a header or some code that would indicate to the CDN to compress those files? Just want to make sure I’m specific in what I ask.
I suspect something is getting stripped or not read correctly and I’d like to indicate what that could be.
Your CDN is not compressing certain files that they should do by default.
Maybe there is a setting turning compression on or off. Make sure it is turned on. MOST CDNs also allow you to control compression by file type (i.e. MIME type) so things that are already compressed, like JPEG pictures, will not be compressed twice.
So you need to call up your CDN and say:
Hey, my files are not compressed (gripped in tech lingo). What should i do to turn on compression?