Jump to content

[Answered] Php7 And Zlib Compression


fwfxf8uv

Recommended Posts

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
Link to comment
Share on other sites

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/
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...