How to enable compression with mod_deflate
Mod_deflate is an Apache module that is used to compress the data transferred from the server to the client. This is an optimization measure that you can use to speed up your site and reduce the bandwidth.
All HostKnox servers have mod_deflate installed. To use it you just need to enable it by putting some directives in an .htaccess file. If you want all the content that can be accessed by web visitors to be compressed, put the directives in the .htaccess file that's in the public_html directory on your hosting account. You can edit the file from the Files section of the Pixie control panel; just click on the file's name, put the directives on a new line and save the file. If you don't have an .htaccess file in the desired folder (e.g. public_html) you can also create it from the Files section of the Pixie control panel; simply use the Create File button that's in the black area on the right.
The AddOutputFilterByType directives list all the file types that should be compressed before being transferred from the server to the client's browser. After they are transferred the browser uncompresses them and the webpage is displayed.
There are some additional instructions with the BrowserMatch directives. In this case they are for the browser Netscape Navigator version 4.x which has problems with uncompressing content. Depending on the particular version, if this browser is used by the client either only text/html files will be gzipped or no compression will be applied.
Was this answer helpful?
- How to change the error message for the different error codes and redirect errors
- How to block access to files on your hosting account
- How to insert comments and comment out directives in .htaccess files
- How to change the HTTP status of redirected content
- What are .htaccess files and how to create and edit them