Enable GZip Compression
Compressing your website pages and static assets on the web/hosting server is a great way to improve your site speed overall. GZIP Compression reduces the size of static asset/file/page to which it is applied subsequently making a website load faster.
Most modern browsers support compression of HTML, CSS, and JavaScript files. So if you set up your web server to deliver compressed files the majority of your readers will receive compressed files, greatly improving their delivery speed.
Additionally, having GZIP Compression enabled on the CDN’s End ensures all your compression-able files are optimized before they are delivered
GZIP Compression on a web server running Apache
Put the code below in your .htaccess file.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
############################################################################################
# Deflate files to fasten the loading
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE application/x-httpd-php text/html text/xml text/plain text/css text/javascript application/javascript application/x-javascript image/jpeg image/jpg image/png image/gif font/ttf font/eot font/otf
# properly handle requests coming from behind proxies
Header append Vary User-Agent
# Properly handle old browsers that do not support compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Explicitly exclude binary files from compression just in case
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|pdf|swf|ico|zip|ttf|eot|svg)$ no-gzip
############################################################################################ |
Note: this code is a part of the perfect .htaccess tutorial.
Enabling GZIP Compression on CDN (Pull/Push Zone)
To Purge the Cache for a Pull Zone, please login to your account and follow these steps:
- Click Manage Zones
- Click View Pull Zones
- Click Manage next the zone you wish to delete
- Hit the “Settings” tab.
- Under Compression Settings, you will find a Checkbox labeled “Enable GZip Compression for the following file types“. Tick that Checkbox and hit the Update button.

Support