Delicious Brains

Documentation

Assets: Enable Gzip Compression in CloudFront and MaxCDN

If your CDN supports automatic compression, you should disable the Gzip option within WP Offload S3 and enable it within your CDN control panel. This will improve compatibility with very old browsers by honoring the Accept-Encoding header. In some cases it will also improve server performance, as compressing assets can be CPU intensive.

CloudFront

Log into the AWS console and open your CloudFront distribution settings. Navigate to the Behaviours tab and edit the behaviour which points to your S3 bucket.

gzip-cloudfront-1

Enable the option ’Compress Objects Automatically’ and save the settings.

gzip-cloudfront-2

Your distribution will begin to replicate the new settings to all existing edge locations, which can take a while to complete. Once the ‘State’ column updates to ‘Enabled’ the changes have replicated and gzipped content will begin to be served.

gzip-cloudfront-3

MaxCDN

Log into the MaxCDN control panel and navigate to your pull zone.

gzip-maxcdn-1

Open the settings tab and check the option ‘Serve compressed files’. Save your settings for the changes to take effect.

gzip-maxcdn-2

Once your new settings have replicated across all edge locations compressed content will begin to be served.