> .. filters 
> filters, which allow your cfserver to compress the output of the processed 
> cfm pages before sending it down the pipe, making it really small for extra 
> speed of download.
> 
> Unfortunately tho, it is relevant to cfmx only.

As Viktor said, it was raised at MXDU. 

Spent 5 minutes this morning trying it with Apache 2 on one of our
test boxes here. If you're not using Apache, why not? But I'm sure
lesser webservers can do it too.

I've got to say, it's magic stuff. Works at the webserver level, not
the App level, so you could be using Perl for all Apache cares.

On an admittedly extremely small sample, I've been getting compression
ratios of around 9, which I thought terrible till I did a side-by-side
compressed & uncompressed comparison. The number is a ratio, not a
percentage. So I'm numerically challenged.

Uncompressed: 134371 bytes. 
Compressed:    12884 bytes.

That's a saving of over 120K! While I couldn't detect any difference in
speed over the lan, I'd imagine it'd be quite pronounced on a modem. 
Plus it'd do nice things for traffic usage. More testing is needed to
see what it'll do to processor usage.

To get it working with Apache 2:

(Disclaimer: I've run this for 5 minutes on a test box. If you 
set this up and your site breaks, or your box melts from the 
processor overload, tough.)


------------------------- httpd.conf  ---------------------

# make sure you're loading the deflate module
LoadModule deflate_module modules/mod_deflate.so

# the headers module might be necessary too
LoadModule headers_module modules/mod_headers.so

# add in a logformat line that includes the ratio in brackets
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" (%{ratio}n)" 
ratiolog

# this is set to compress EVERYTHING except gif, jpg and png
# check the mod_deflate docs for other options

<Directory "/path/to/your/directory/of/choice">
        SetOutputFilter DEFLATE

        # Netscape 4.x has some problems...
        BrowserMatch ^Mozilla/4 gzip-only-text/html

        # Netscape 4.06-4.08 have some more problems
        BrowserMatch ^Mozilla/4\.0[678] no-gzip

        # MSIE masquerades as Netscape, but it is fine
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

        # Don't compress images
        SetEnvIfNoCase Request_URI \
        \.(?:gif|jpe?g|png)$ no-gzip dont-vary

        # Make sure proxies don't deliver the wrong content
        Header append Vary User-Agent env=!dont-vary
</Directory>

<VirtualHost your.ip.goes.here>
  ServerName   your.server.com.au

# note: comment OUT TransferLog  
# add in CustomLog
  CustomLog     "/path/to/your/logs/access.log" ratiolog

# set up the ratio logging variable
  DeflateFilterNote ratio
</VirtualHost>

-------------------------------------------------------



Paul Haddon
Technical Services Manager
Formstar Print Technologies


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to