user1401261
user1401261

Reputation: 1

Gzip compression to html website through PHP

my website is in html and i want to enable gzip compression, my server has provided gzip compression through PHAR extension.

can you guide me how to do gzip .

Upvotes: 0

Views: 588

Answers (1)

Sal S.
Sal S.

Reputation: 21

I prefer to enable GZIP in the .htaccess, assuming your host allows you to change/add an .htaccess file. If they do, I write about how to enable GZIP:

#Gzip
<ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
#End Gzip

Upvotes: 2

Related Questions