How to enable compression on website? Print

  • 1

Issue:

When you check your website using http header tools you can see that your website is not optimize.

Reason:

Compression is not enabled on your website.

Solutions:

You may force your website to use compression that has been ready by our web server. Please add below script into your .htaccess file. you may use either one of the options below:

  1. Force compression on all content.
    <ifModule mod_deflate.c>

    SetOutputFilter DEFLATE

    </ifModule>
  2. Force compression on selected files.
    <ifModule mod_deflate.c>
    <FilesMatch "\.(css|js|php|html|php3|xhtml|xml)$">

    SetOutputFilter DEFLATE

    </FilesMatch>
    </ifModule>

Please take note, compression on images sometime can cause image not able to display properly. we suggest you to use option 2 for better result.


Was this answer helpful?

« Back