Sorry for late reply, didn't get any notification by email due to my
list preferences. It could send me a follow-up on the thread I
posted... Oh, well...

Minification before gzipping still does make a difference:
this is my index.html:

$ wc -c minified.html
4827 minified.html
$ wc -c nonminified.html
74910 nonminified.html
$ gzip minified.html && wc -c minified.html.gz
2134 minified.html.gz
$ gzip nonminified.html && wc -c nonminified.html.gz
8247 nonminified.html.gz

Nearly 4-fold difference of minified&gzipped over non-
minified&gzipped. Not to mention minified HTML is faster and easier
for a browser to parse. And the minified-rendered views take up less
RAM when cache.ram'd (which is what one should do on nearly all
pages)....

I would like the feature for its obfuscating nature. It hides the
implementation more, what is a loop, what is static html, how deep an
indentation goes...

It must be worth something, Google does it (view-source:https://
www.google.com/).

The implementation quoted in comment #2 (http://code.google.com/p/
web2py/issues/detail?id=369#c2) solves the issue quite well for me. I
haven't found any new bugs. It even minifies inline JS. It works. :-)
I renounce all rights to this code, which likely "belong" more to the
original inventor of this: 
http://packages.python.org/web2py_utils/output.html#compress-output
(As far as I am concerned, you can just use it.)

I agree a separate htmlminify module is an acceptable solution. :-)

Reply via email to