Minifying HTML reduces the size of the page by upto 10-15%, and google pagespeed recommends minifying HTML. Themes pages tpl.php included with views module are not minified for HTML. This applies to template files of many other drupal modules too. We got to minify them!\

I have attached minified views-view-table.tpl.php. I could reduce the size from 1.5 to 1.3KB

CommentFileSizeAuthor
views-view-table.tpl_.php_.txt1.38 KBmclaren

Comments

mclaren’s picture

esmerel’s picture

Category: bug » feature
Priority: Critical » Normal

I don't remotely see how this is a bug, or critical.

esmerel’s picture

Status: Active » Closed (won't fix)

Also, your 'minifying' just removes spaces and sacrifices readability.

blitux’s picture

Is there a way to achieve this automatically? Using a sort of cache to avoid the overhead of processing the html on each page request.

blair003’s picture

I could be wrong, but I don't think there's that much to be gained by minifying html if you are already using compression (other than a better pagespeed/yslow score).

To test, you could compress the file and see how many bytes that is, then minify it, compress it and see how many bytes that is. I would be suprised if it's 10 to 15% difference between the two files.