Knowledgebase
HOW TO: Enable gzip compression for your sites
Posted by Sugen S. on 27 August 2018 12:25 PM

When a user hits your website a call is made to your server here to deliver the requested files. The larger the files are, the longer it will take for your webpage to load for your visitors. By enabling gzip compression you’re reducing the size of the files and you’re improving the site speed.

Our servers fully support gzip compression and it’s fairly easy to enable it. Simply add the following lines to your .htaccess:

## Enable gzip compression  ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
## End gzip compression ##

After saving these lines in .htaccess please re-test your site(s) and you should see the difference. In addition to gzip compression you can also leverage browser caching as explained in the article here.

(0 vote(s))
Helpful
Not helpful

Comments (0)
Copyright © 1998 - 2018 Shinjiru International Inc. All Rights Reserved.