雅虎压缩器

发布于 2024-07-14 14:03:29 字数 42 浏览 4 评论 0原文

有人知道如何在我的网站上应用 Yahoo 压缩机(YUI 压缩机)吗?

Any one know how can I apply Yahoo Compressor (YUI compressor) on my website?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

终陌 2024-07-21 14:03:30

它的文档位于此处。 您可以使用它来压缩/缩小 JavaScript 和 CSS 文件。 如果您有兴趣加快网站速度,也可以尝试一下 YSlow

The documentation for it is here. You use it to compress/minify your JavaScript and CSS files. If you're interested in speeding up your site, have a play around with YSlow too.

白色秋天 2024-07-21 14:03:29

这是 YUI 压缩机的 自述文件。 这是他们网站上的如何使用

Here is the README on the YUI Compressor. And here is the How To use from their site.

夜巴黎 2024-07-21 14:03:29

在将 .js.css 文件放到服务器上之前,您需要使用 YUI 压缩器对其进行压缩。 由于压缩器是用Java编写的,所以需要运行java文件进行压缩。 这是从 YUI web 复制的:

从命令行使用 YUI 压缩机

$ java -jar yuicompressor-x.y.z.jar

Usage: java -jar yuicompressor-x.y.z.jar [options] [input file]

以下命令行(xyz 代表版本号):

java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js

将缩小文件 myfile.js 并输出文件 myfile-min.js。 有关如何使用 YUI 压缩机的更多信息,请参阅存档中包含的文档。

You need to use the YUI compressor to compress your .js and .css files before putting them on the server. Since the compressor is written in Java, you need to run the java file for compression. This is copied from YUI web:

Using the YUI Compressor from the command line

$ java -jar yuicompressor-x.y.z.jar

Usage: java -jar yuicompressor-x.y.z.jar [options] [input file]

The following command line (x.y.z represents the version number):

java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js

will minify the file myfile.js and output the file myfile-min.js. For more information on how to use the YUI Compressor, please refer to the documentation included in the archive.

沙与沫 2024-07-21 14:03:29

在将 JavaScript 文件加载到网站上之前,您可以使用 YUI 压缩器来压缩它们,从而创建较小的下载。 它不用于动态压缩。 查找 Http 压缩模块或在您的网络服务器上启用压缩。

You use YUI compressor to compress javascript files before you load them on your website, so creating smaller downloads. It's not used for on the fly compression. Look for Http Compression modules or enable compression on your webserver.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文