MBF Knowledge Base

How to decrease server bandwidth via compression

Sometimes the speed of the server is perceived to be terribly slow, but it is the cause of the modem speed or bandwidth at some intermediate server. To cut down on the amount of traffic generated from the server, you could compress web pages or condense them by removing excess garbage. Keep in mind that this will put a little more load on your server, but it is practically nothing when compared to your IMAP server and SquirrelMail.

This solution only compresses the output to clients that support it, so you don't need to worry about corrupting data to some older browsers.

Configure the web server to compress the web pages (and maybe images). The module mod_deflate is part of Apache since 2.0 and there's also a third party module for Apache called mod_gzip.PHP. You can also compress all PHP pages sent out by setting the output_handler to ob_gzhandler, or enable zlib.output_compression in php.ini. SquirrelMail has the Gzip Compressed Output plugin that enables compression of output in the same way that PHP does, but only for SquirrelMail.