TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

HTML minifier revisited

99 点作者 kangax将近 11 年前

8 条评论

__david__将近 11 年前
&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 未加载
bmm6o将近 11 年前
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 未加载
itry将近 11 年前
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 未加载
grk将近 11 年前
I&#x27;d like to see a before&#x2F;after comparison after gzipping the results.
评论 #8101238 未加载
hiphopyo将近 11 年前
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 未加载
sogen将近 11 年前
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 未加载
frik将近 11 年前
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.
gotofritz将近 11 年前
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