httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] HTML compression module?
Date Wed, 30 Jun 2004 00:48:57 GMT
On Tue, 29 Jun 2004, Joey Hewitt wrote:

> Hi,
>
> I found a site that lets you paste (X)HTML or CSS into a textarea and submit
> it to a script that strips out newlines and other stuff that is not strictly
> necessary for correct parsing.  This effectively "compresses" the stuff - I
> lopped 40% off of my css file.

I guess you have lots of whitespace:-)

> Anyhow, does anyone know of a module for Apache that does this to content as
> it leaves the server?

Yes, but it's part of something bigger, and not published.

>	  It's an interesting alternative, or perhaps additive,
> to gzip'ping the content, for browsers that don't support that

Actually it'll gain a lot less than you'd think, because once you've
stripped down the whitespace, the compression you get by gzipping it
will be correspondingly less.

As an alternative - yes, it's a possibility.

> I'm thinking the overhead of the server doing this might outweigh or hardly
> make a dent in the bandwidth savings enough to make this feasible, but it's
> a worth a shot.

Actually the server overhead could be pretty negligible: certainly less
than gzipping it.

>    I might even write the module myself if there isn't already
> one and it proves to be worthwhile enough.  What do you guys think?

If you take a simplistic approach (and don't mind screwing up <PRE>), the
module would be maybe an hours work.  You could perhaps take mod_txt as a
startingpoint for manipulation like this.

Alternatively, grease my palm and I'll write it for you:-)

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message