[aklug] Got compression?

From: Christopher Howard <christopher.howard@frigidcode.com>
Date: Tue Nov 22 2011 - 16:25:36 AKST

Thought of the day: I found it interesting to learn that, at the present
time, every major Web browser supports transparent compression during
HTTP transfers, and every major Web server supports it, but most
everyone still doesn't use it, simply because it is not turned on by
default in any major Web server software.

This was pretty easy to set up in lighttpd. Just had to:

1. Enable mod_compress
2. Uncomment the config line describe the compression cache directory
3. Uncomment the compress.filetype line and pick which mime types I want
compressed. In my case I picked "text/plain", "text/html", "text/css",
"text/xml", and "text/javascript". I think most text-based content can
be compressed, though for some reason I couldn't get it to compress
SHTML. (Presumably some inherent incompatibility with SSI.)

It's pretty cool I think because it compresses (from what I've seen) to
about %50 for these text-based files, which is a lot of bandwidth over
time. (It's pointless to compress images and other multimedia because
they are usually compressed already.) And it doesn't add much processing
overhead because it is simply gzip compression, and the compressed files
are cached for reuse. I also read somewhere that the processing savings
from having less packets to process actually outruns the processing
overhead from compression (but I'll admit I don't know much about that.)
And of course half the compression work is on the browser side, meaning
that there is that much less work for your server.

I think that the Apache module is mod_gzip, for those of you in that
camp. There is also this nifty on-line tool for checking if a resource
is using compression:

http://www.whatsmyip.org/http_compression/

-- 
frigidcode.com
theologia.indicium.us
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Nov 22 16:23:17 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 22 2011 - 16:23:17 AKST