Re:Ask HN: Why do we minify JavaScript, yet not HTML?
by nickzoic on Sunday December 02, 2012 @05:40PM
(#4862871)
Yeah, I like to minify the HTML as well ... most template engines have an "omit whitespace" option or flag which lets you do this.
Every now and then whitespace turns out to be significant though ... so you need to be slightly intelligent about how you handle it.
It is probably less relevant in HTML5 times where you are most likely just using a small bit of HTML to act as a "loader" for your Javascript, which then takes over. The JS and CSS files are, in this case, way bigger than the HTML.
Every now and then whitespace turns out to be significant though ... so you need to be slightly intelligent about how you handle it.
It is probably less relevant in HTML5 times where you are most likely just using a small bit of HTML to act as a "loader" for your Javascript, which then takes over. The JS and CSS files are, in this case, way bigger than the HTML.