本文介绍了如何缩小HTML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否存在一些可以最小化HTML的工具(或Rails本身)(例如 Jammit 的作用是CSS和JS文件)?
Is there some tool (or Rails itself) that can minify HTML (like what Jammit does for CSS and JS files) ?
其次,这里的最佳实践是什么,是否值得缩小html?(这是一个可用于手机的网站,因此保持体重减轻很重要)
Secondarily, what is the best practice here, and is it even worth minifying the html?(this is for a site that will be served to mobile phones, so keeping weight down is important)
推荐答案
在HTTP级别启用压缩将为您提供的功能远远超过了缩减HTML的功能,但是 tidy 非常适合将转换应用于HTML,包括删除多余的空格,注释等...
Enabling compression at HTTP level will serve you much more than minifying HTML, however tidy is good to apply transformations to HTML, including removing extraneous spaces , comments, etc...
这篇关于如何缩小HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!