[PLUG] HTML Whitespace Compression

Jason Van Cleve jason at vancleve.com
Sat Jul 13 03:56:55 UTC 2002


On Fri, 12 Jul 2002 19:52:46 -0700 (PDT)
Paul Heinlein <heinlein at attbi.com> wrote:

> Not.

The PRE tag is one exception, you're right.  But still I doubt it would
be impossible to do this, if need be.  It would take a little processing
power, but not that much.

> * quoted strings in JavaScript, or any client-parsed script

How would quoted strings be a problem?  They start with a quote, not
whitespace.  Remember, I'm just talking about whitespace at the start of
lines, not everywhere.

> * strings in forms

You mean as in a TEXTAREA?  That's probably another exception, but like
PRE, it shouldn't be that hard.

> Honestly, if web performance hinges on the stripping of whitespace, 
> then computer science is a lost, lost cause.

Well, Mr. Heinlein, that's a rather general declaration, but I agree
with what you're saying.  But some managers refuse to see this light. 
I'm not saying I would ever want to have to resort to the Stripper, but
if it came to that versus using tabs unilaterally, I'd have to think
about it.

I'm actually a little suprised there's no compression features in HTTP. 
Seems like the browser could request a page and indicate that it
supports a simple compression of some sort, and the server could then
compress it on its way out.  Given the amazing volume of indentation
I've seen in some (very large) pages, this could have an impact after
all.

--Jason




More information about the PLUG mailing list