HTML缩小? [英] HTML minification?

查看:101
本文介绍了HTML缩小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在一个在线工具,我们可以将页面的 HTML 源输入到并将缩小代码?

Is there a online tool that we can input the HTML source of a page into and will minify the code?

我将对aspx文件执行此操作,因为让Web服务器对它们进行gzip压缩不是一个好主意...

I would do that for aspx files as it is not a good idea to make the webserver gzip them...

推荐答案

也许尝试 HTML Compressor ,这是一个之前和之后的表,显示了它可以做什么(包括对于Stack Overflow本身):

Perhaps try HTML Compressor, here's a before and after table showing what it can do (including for Stack Overflow itself):

它具有许多选择,可以优化您的页面,包括安全的脚本最小化(压缩器,Google Closure编译器,您自己的压缩器).默认选项集非常保守,因此您可以从此开始,然后尝试启用更激进的选项.

It features many selections for optimizing your pages up to and including script minimizing (ompressor, Google Closure Compiler, your own compressor) where it would be safe. The default option set is quite conservative, so you can start with that and experiment with enabling more aggressive options.

该项目有充分的文档记录和支持.

The project is extremely well documented and supported.

这篇关于HTML缩小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆