[Zope] Surpress white space?

Tino Wildenhain tino@wildenhain.de
Wed, 09 Jul 2003 10:22:14 +0200


Hi Chris,

Chris Beaven wrote:
> On a related note (but curving off to a tanget), I always thought it 
> would be quite good if there was a code compressor in Zope which could 
> remove all useless whitespace to reduce the actual amount of data being 
> sent in each page... There is something similar to this for Apache is 
> there not?

There is a gzip/compress implemented in all recent Zopes, so
if your browser supports it you can have your content compressed. This
eliminated not only the whitespaces...

Of course you can do this with Apache too.

For the Problem above it would help a lot to skip DTML and use
ZPT. ZPT makes it easyer to have good formated HTML source.
Otoh, HTML is not primary meant for human eyes :)

> Unless it's inside a comment or a pre tag, are there many other 
> situations where we need a new line character (or 2 spaces for that matter)
> The biggest cause of this is probably Dreamweaver formatted pages where 
> the tags get indented with a whole lot of whitespace.
> 
You could define a method to reduce this at upload-time.
Of course this would require to write a python product.

Regards
Tino