Resources: HTTP Compression
- HTTP Compression Speeds Up the Web
updated on March 23, 2005 21:48:03
This article from WebReference explains what HTTP compression is. HTTP compression works on a simple principle: less data is sent by the server, translating into faster delivery of web sites.
The article suggests using mod_gzip for Apache servers. The info for mod_gzip is a bit out-dated since there is actually a fully functional, non-beta version for Apache 2 users now.
- The Effect of HTML compression on a PPP modem line
updated on March 23, 2005 22:26:15
This W3C report indicates dramatic improvements in page delivery speed on a modem connection with HTTP compression.
- The Effect of HTML compression on a LAN
updated on March 23, 2005 22:31:30
A similar W3C report showing results of HTTP compression on a LAN.
- mod_deflate - Apache HTTP Server
updated on March 25, 2005 14:58:16
This is the HTTP compression module that comes bundled with Apache 2. To use it simply load this module in your Apache config file and then state your directives.
This document provides information on what Apache directives are available for this module along with a sample configuration. If you run your own Apache 2 server this is probably the quickest way to set up HTTP compression.
Note, Linux Apache 2 servers require recompiling for mod_deflate to work. If you are running Apache 1 you’ll have to use an alternative module like mod_gzip.
- mod_gzip Compression Module
updated on March 25, 2005 15:01:27
Another HTTP compression module for Apache is mod_gzip. This is the module discussed in WebReference’s article. Apache 1 servers will have to use mod_gzip instead of mod_deflate.
Installation of mod_gzip on Linux servers require recompiling it as a dynamic shared object or a static module.
- PHP: Zlib Compression Functons
updated on March 25, 2005 16:06:04
HTTP compression can also be handled by PHP. This entry from PHP’s Manual explains how to use Zlib Compression to compress web sites. To use this compression simply change the values for the directives stated here in PHP’s ini file.
Note, values stated in the manual as ‘0’ correspond to ‘Off’ in php.ini. The PHP manual is indicating to the reader that the value is boolean, meaning 2 states or ‘On’ and ‘Off.’ This convention is followed throughout the whole PHP manual. Here again, Linux users must recompile PHP with Zlib to use this function.
- PHP: ob_gzhandler
updated on March 25, 2005 16:28:36
Another way to handle HTTP compression with PHP. The ob_gzhandler option allows only particular scripts to be compressed if so desired. Call the ob_gzhandler function directly in your PHP code.
This method may appeal to Windows users who don’t want to configure Apache or PHP to handle HTTP compression. Another benefit of this method is Linux users can use this the exact same way as Windows users. No recompiling required for this method.
- Webperf.org’s URL Breakdown
updated on March 24, 2005 16:24:47
This performance monitor from Webperf.org shows you exactly how fast it takes a particular web site to load. A good way to test any code modifications or compression settings for your site. The detailed report of each item loaded from a site lets you easily identify any bottlenecks.