httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joey Hewitt" <>
Subject Re: [users@httpd] HTML compression module?
Date Wed, 30 Jun 2004 20:14:10 GMT
Nick Kew <> wrote:
> 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
> > it to a script that strips out newlines and other stuff that is not
> > necessary for correct parsing.  This effectively "compresses" the
stuff - I
> > lopped 40% off of my css file.
> I guess you have lots of whitespace:-)

I do. ;)

> > 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.

That makes sense.

> As an alternative - yes, it's a possibility.
> > I'm thinking the overhead of the server doing this might outweigh or
> > make a dent in the bandwidth savings enough to make this feasible, but
> > a worth a shot.
> Actually the server overhead could be pretty negligible: certainly less
> than gzipping it.

Agreed, now that I think about 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

Actually, unless you're dying to ;) , I think I'll give it a try.  Then I
can say I have my own code helping serve up my content. ;)

Anyway, I use whitespace liberally, so my savings may amount to more than
the average person's, but I still don't think I'll get much.  I don't even
have a heavy-traffic site or pay by the amount of bandwidth I use, so it's
not even real important to me, just an interesting idea I want to see work.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message