Compressing static assets with gzip compression reduces bandwidth usage and improves page load time. Most modern web browsers support gzip compression for static assets such as HTML, CSS and JavaScript.
Depending on your web server, gzip can be enabled on your origin server and on StackPath's SecureCDN servers. This tutorial shows how to enable it on the latter.
-
Select Sites in the left-hand menu:
-
Click the + icon next to the Site Name to display the sites.
-
For the site you want to enable gzip on, click Manage. Then select Settings in the dropdown menu:
-
in the Edge Settings section, find the option called Compression and tick the box next to it:
-
There is also an option called Advanced Compression Level.
Gzip has various compression levels (1 being the lowest). On StackPath you can select a compression level from 1 to 6. By default the compression level is set to 1.
-
If you want to select a compression level other than 1, tick the box next to Advanced Compression Level and select a new compression level.
Make sure the box next to Compression is also ticked.
-
Click Update.