httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <>
Subject Re: Whitespace strip filter for httpd v2.1
Date Tue, 23 Nov 2004 01:38:34 GMT
Cliff Woolley wrote:
> On Mon, 22 Nov 2004, Graham Leggett wrote:
>>I have attached a small filter module that strips leading whitespace
>>from text files. This would typically be used to remove the "indenting"
>>whitespace found inside HTML files, resulting in a significant reduction
>>in network traffic for some sites. I didn't bother to include trailing
>>whitespace removal, as this involved buffering (leading whitespace
>>removal requires no buffering).
> Well, we've had people submit modules in the past that stripped the
> extraneous whitespace from HTML files, and we rejected them.  Check the
> archives for messages from a guy named fabio rohrich, who wrote a module
> called mod_blank to see why that might have been.  I don't completely
> remember the details.

In a nutshell,
it is very hard to strip whitespace out of HTML, and have the resulting 
file still be as valid as the old one. Browsers are very forgiving on 
something and not on others. for example,
you should not strip code inside of javascript, or 'pre' tags.

> --Cliff

View raw message