Jump to content

Recommended Posts

Posted (edited)

After I posted the question, I noticed that zlib was already enabled.

But "zlib.output_compression" is "Off". So I edited my question.

 

Is it ok to set that to On or some size for the buffer? Will that break anything?

 

Thanks again.

Edited by isobar
Posted

We already have mod_deflate installed which does the same thing, but works for all file types not just php files.

 

Put something like this in your .htaccess to enable it

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
You can test your pages to see if it's enabled properly by using a tool like this http://www.whatsmyip.org/http-compression-test/
Posted (edited)

Krydos, on 12 Jul 2017 - 9:51 PM, said:

Put something like this in your .htaccess to enable it...

-

Enabling mod_deflate (gzip compression) in cPanel

 

in box [ Software ] - click on [ Optimize Website ]

 

select [ Compress all content ]

 

click on [ Update Settings ]

 

-OR-

 

select [ Compress the specified MIME types. ]

to limit which types of content are compressed - input the particular MIME (file) types you want to compress

(e.g. text/html text/plain text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript )

 

NOTE: it is best not to add image, video, audio, PDF or other types of binary files - these file formats are already compressed - so it is not necessary to compress these further

 

once you have set your file types - click on [ Update Settings ]

 

-OR-

 

to turn off gzip compression - select [ Disabled ] - click on [ Update Settings ]

 

-AND-

 

test your site (URL) at http://www.whatsmyip.org/http-compression-test/

###

Edited by bdistler

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...