为什么某些网页的源代码全都放在一行中? [英] Why is the source code for some web pages all in one line?

查看:86
本文介绍了为什么某些网页的源代码全都放在一行中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当查看许多网页的源代码(例如JS,CSS,HTML)时,我发现它们在一行中.他们是如何做到的?他们是否使用一些工具来做到这一点?我们可以重组它吗?

When viewing lots of webpages' source code (like JS,CSS,HTML), I find them in one line. How did they make this? Do they use some tools to make it? Can we restructure it?

谢谢.

推荐答案

使用缩小技术

也提供一些免费工具

http://developer.yahoo.com/yui/compressor/

http://www.minifycss.com/minify-tools/minify-css-tools.php

http://jscompress.com/

http://www.minifycss.com/css-compressor/

http://code.google.com/p/htmlcompressor/

它结合了多个CSS或Javascript文件,删除了不必要的空格和注释,并为它们提供gzip编码和最佳的客户端缓存标头.

It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers.

这篇关于为什么某些网页的源代码全都放在一行中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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