使用 IIS http压缩时压缩 javascript/css 文件的好处

发布于 2024-07-21 04:53:54 字数 211 浏览 6 评论 0原文

看起来 IIS httpCompression 会压缩您的文件。 如果进行了这种压缩,那么为什么要使用 Packer、JSMin 或 Yahoo Compressor 等压缩工具来压缩文件?

It looks like IIS httpCompression compresses your files. If this compression is in place, what is the reason to compress files using compression tools like: Packer, JSMin or Yahoo Compressor?

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

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

发布评论

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

评论(2

二货你真萌 2024-07-28 04:53:54

您提到的工具是压缩工具,而不是压缩工具。

尝试“压缩”您的普通文件和缩小后的 JavaScript 文件,然后查看它们的大小。 你可能会发现它更小,你可能会发现它没有什么区别。

您将获得的一个好处是,不支持压缩的代理浏览器仍然会受益于缩小。

The tools you mention are minifiers, and not compression.

Try "zipping" your normal and your minified javascript files and see what size they both are afterwards. You may find it is smaller, you may find it makes no difference.

The one gain you will get though is that browsers of proxies that don't support compression will still benefit from minification.

林空鹿饮溪 2024-07-28 04:53:54

原因是某些浏览器不支持 gzip 压缩的 HTTP 传输或存在错误。 我们在这里讨论的是 NS4 和早期 IE,因此除非您无法控制您的网络服务器(第 3 方托管),否则原因不再存在。

the reason is, or was, that some browsers didn't support gzip'ed HTTP transfer or had bugs with it. We're talking NS4 and early IE here so the reasons aren't really there anymore unless you have no control over your webserver (3rd-party hosting).

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