压缩标记
更多的是一个理论问题。
我们压缩/缩小 css & Node.js,但是有人曾经想过或尝试过压缩标记吗?
问:标记压缩的优点(赞成/反对)、可能的工具和脚本。
由于这个问题很难找到解决方案,因此我将采用最详细的答案。
谢谢!
More a theoretical question.
We compress/minify css & js, but has anyone ever thought or tried to compress mark-up?
Q: Benefits (Pro/Contra) of mark-up compression, possible tools and scripts.
As it's hard to have a solution for this Q, I'll take the most detailed answer.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
标记压缩是可能的并且被广泛使用。有几种可能性(可以组合):
body
标签,这是有道理的,因为省略可以节省 7 个字节的流量,这确实是一个如果你想想谷歌的每日页面浏览量,那就很多了)
markup-compression is possible and widely used. there are a few possibilities (wich can be combined):
<pre>
orwhite-space: pre;
)body
-tag for example. for a site like google, this makes sense, as leaving out</body>
saves 7 bytes of traffic, wich is really a lot if you think of the daily page-views of google)我不明白你为什么要寻找有趣的答案,或者认为很难找到这个问题的解决方案。标记通常以压缩形式提供,例如使用 Apache 的 mod_deflate模块。 Stack Overflow 本身正在为您提供压缩标记。
I don't why you're looking for funny answers or think it's hard to have a solution to this question. Markup is routinely served in a compressed form, for example by using Apache's mod_deflate module. Stack Overflow itself is serving you compressed markup.