Asp.Net CDN 压缩 JQuery 未压缩?
有谁知道 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。
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.
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的 FireBug 看到它们(都)被压缩:
My FireBug sees them (both) gzipped:
你是在代理后面吗?在工作中,我们的代理会在某些文件到达每个客户端之前取消对其的压缩
Are you behind a proxy? At work our proxy rips out the compression on some files before it reaches each client
不知道发生了什么,但现在文件显示已压缩。正如我的一条评论中提到的,当我从一个 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.