TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

HTML minifier revisited

99 pointsby kangaxalmost 11 years ago

8 comments

__david__almost 11 years ago
&gt; it&#x27;s still unacceptable for minification to take more than 1-2 minutes. This is something we could try fixing in the future.<p>Wow. Yes. I would even say taking more than a <i>single second</i> is pretty unacceptable. There&#x27;s a bad algorithm in there somewhere...
评论 #8099625 未加载
评论 #8100574 未加载
评论 #8100090 未加载
bmm6oalmost 11 years ago
The workarounds to handle client-side templating seem dirty. Is it really true that e.g. Handlebars requires you to send illegal HTML to the browser? That seems like such a bad idea.
评论 #8099585 未加载
评论 #8099217 未加载
评论 #8099558 未加载
itryalmost 11 years ago
I find it hard to imagine a scenario where this technology pays off. Any examples of real live systems that gained from this?
评论 #8099192 未加载
评论 #8099683 未加载
评论 #8099068 未加载
评论 #8099053 未加载
评论 #8099047 未加载
评论 #8099046 未加载
评论 #8101234 未加载
grkalmost 11 years ago
I&#x27;d like to see a before&#x2F;after comparison after gzipping the results.
评论 #8101238 未加载
hiphopyoalmost 11 years ago
I&#x27;d love your feedback on a similar Rack middleware for Rails: <a href="https://gist.github.com/frankie-loves-jesus/d7eec0ebab0525e94256" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;frankie-loves-jesus&#x2F;d7eec0ebab0525e9...</a><p>To me it&#x27;s mainly for cosmetic purposes -- partly because Google does it and I want to be like Google -- and because I want to give a little &quot;fuck you&quot; to my competitors who will inevitably try to read my source.
评论 #8100505 未加载
sogenalmost 11 years ago
Kangax: Just one notice, it chokes on comments like this:<p>&#x2F;<i></i>*<p>* _ _<p>* | (_)<p>* __| |_ ___<p>* &#x2F; _` | |&#x2F; _ \<p>* | (_| | | __&#x2F;<p>* \__,_|_|\___|<p>*<p>*&#x2F;<p>No biggie, but had to manually remove them from my code.
评论 #8103477 未加载
frikalmost 11 years ago
I prefer a HTML minifier that parses and builds in internal AST (like Google closures compiler for JS) over a regex-based minifier.<p>HTML-minifier seems like a good solution, thanks, will try it out.
gotofritzalmost 11 years ago
I really would like to see a comparison of the minified + gzipped vs just gzipped vs just collapsing all multiple blank spaces into a single ones + gzipped