News for hackers. Stuff that matters.
Re:Ask HN: Why do we minify JavaScript, yet not HTML? by TazeTSchnitzel on Sunday December 02, 2012 @04:25PM (#4862579)
>extra task of running minimization on the complete HTML of a webpage

Of course that would be slow, but if you have compiled templates on a dynamic site, could you not strip out whitespace at compile-time?

Re:Ask HN: Why do we minify JavaScript, yet not HTML? by itsprofitbaron on Sunday December 02, 2012 @04:34PM (#4862608)
Minifying dynamically generated files on the fly is harder than static ones (Its obviously possible but you have to take it into consideration) & there are some cases where it actually might decrease performance as, every page request requires minifying.

Personally, I think the benefits of minifying your HTML won't pay off until you're receiving a significant amount of traffic anyway. Which is why, for the large majority of sites they'll see better value through minifying/combining their CSS/JS and tackling the other low hanging fruit first.

Re:Ask HN: Why do we minify JavaScript, yet not HTML? by mistercow on Monday December 03, 2012 @12:37AM (#4864112)
I think you didn't understand the parent post. TazeTSchnitzel is saying that when the template is initially compiled, it can be minified. Then you'd get that minification for free forever after.
Re:Ask HN: Why do we minify JavaScript, yet not HTML? by itsprofitbaron on Monday December 03, 2012 @02:19PM (#4867269)
I understood the question which is why, I said there are still performance issues if you try to do this & its only beneficial to websites that receive a large volume of traffic as they are the ones who will see the benefits of doing this; there are other low hanging fruit that can improve performance before even looking minifying HTML.