Asp.Net CDN 压缩 JQuery 未压缩?

发布于 2024-11-09 11:52:05 字数 1239 浏览 4 评论 0原文

有谁知道 Asp.Net 内容交付网络上的 jQuery 文件的缩小版本未进行 gzip 压缩是否有原因?非缩小版本已正确压缩。

示例:

http://ajax.aspnetcdn.com/ajax/ mvc/3.0/jquery.unobtrusive-ajax.js (GZipped) http://ajax.aspnetcdn.com/ajax/ mvc/3.0/jquery.unobtrusive-ajax.min.js(不是 GZipped)

如果我查看 Google CDN,缩小的文件也是gzip 压缩。不幸的是,他们不提供 jquery.unobtrusive-ajax、jquery.validate 或 jquery.validate.unobtrusive。

YSlow Output

HTTP/1.1 200 OK
Cache-Control: public,max-age=31536000
Content-Type: application/x-javascript
Accept-Ranges: bytes
ETag: "075379efba5cb1:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
VTag: 279431312700000000
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
X-Powered-By: ASP.NET
Content-Length: 2745
Age: 6009332
Date: Tue, 24 May 2011 18:13:59 GMT
Last-Modified: Mon, 27 Dec 2010 19:24:02 GMT
Expires: Thu, 15 Mar 2012 04:58:27 GMT
Connection: keep-alive

谢谢,

山姆

Does anyone know if there is a reason why the minified versions of the jQuery files on the Asp.Net content delivery network are not gzip compressed? The non-minified versions are properly compressed.

Examples:

http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.js (GZipped)
http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js (Not GZipped)

If I look at the Google CDN, the minified files are also gzipped. Unfortunately they are not offering jquery.unobtrusive-ajax, jquery.validate, or jquery.validate.unobtrusive.

YSlow Output

HTTP/1.1 200 OK
Cache-Control: public,max-age=31536000
Content-Type: application/x-javascript
Accept-Ranges: bytes
ETag: "075379efba5cb1:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
VTag: 279431312700000000
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
X-Powered-By: ASP.NET
Content-Length: 2745
Age: 6009332
Date: Tue, 24 May 2011 18:13:59 GMT
Last-Modified: Mon, 27 Dec 2010 19:24:02 GMT
Expires: Thu, 15 Mar 2012 04:58:27 GMT
Connection: keep-alive

Thanks,

Sam

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

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

发布评论

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

评论(3

情何以堪。 2024-11-16 11:52:05

我的 FireBug 看到它们(都)被压缩:

在此处输入图像描述

My FireBug sees them (both) gzipped:

enter image description here

挽手叙旧 2024-11-16 11:52:05

你是在代理后面吗?在工作中,我们的代理会在某些文件到达每个客户端之前取消对其的压缩

Are you behind a proxy? At work our proxy rips out the compression on some files before it reaches each client

人间不值得 2024-11-16 11:52:05

不知道发生了什么,但现在文件显示已压缩。正如我的一条评论中提到的,当我从一个 IP 转到另一个 IP 时,情况似乎发生了变化。

Not sure what was going on, but now the files are showing gzipped. As mentioned in one of my comments, it seemed to change when I went from one I.P. to the other.

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