Support Center » Knowledgebase » Unix Tips » Using gzip or deflate Compression

Using gzip or deflate Compression



Compressing your pages and other text data such as javascripts and style sheets can result in a faster and better user experience. Quadra Hosting supports Apache 2's mod_deflate, which is the equivalent of mod_gzip for Apache 1. To enable the page compression on Apache, you may add the following lines into your .htaccess file:

<IfModule deflate_module>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript
</IfModule>

Please note that because most image formats are already compressed, you gain nothing from compressing them. Therefore you should not compress jpg, gif, png files. In fact, doing so may actually increase the amount of data that has to be transferred to the web visitors, which is the opposite of what you would want.

For PHP pages, add the following to .htaccess:

php_value zlib.output_compression On
Alternatively (preferred), add this into .user.ini
zlib.output_compression=On




Article Details
Article ID: 189
Created On: 29 Aug 2012 10:03 AM
 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
Please note that the login and password to the support area is NOT the same as your hosting control panel login and password
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Downloads | Control Panel User's Guide | Server Status
Language: