即使禁用 IIS 压缩,为什么 ScriptResource.axd 仍会被压缩?
我在 IIS 6.0 上运行 ASP.NET 应用程序。 通常我会为动态和静态文件启用压缩。 但是,我暂时关闭了压缩,但“ScriptResource.axd”仍然以压缩形式发送。 这并不像是配置错误,因为“WebResource.axd”没有被压缩。
ScriptResource 和 WebResource 之间有什么区别,前者仍然是压缩的? 它是如何被压缩的?
谢谢。
I run an ASP.NET application on IIS 6.0. Usually I have compression turned on for both dynamic and static files. However, I've turned compression off temporarily, but "ScriptResource.axd" is still sent compressed. This does not feel like a misconfiguration, as "WebResource.axd" is not compressed.
What is the difference between ScriptResource and WebResource, such that the former is still compressed? How is it getting compressed?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web 资源由 AssemblyResourceLoader 类处理,它旨在检索程序集资源并将其提供给 Web 浏览器。 默认情况下,Web 资源不被压缩。
脚本资源由 ScriptResourceHandler 类处理,它负责处理通过 ScriptManager 类引用的嵌入式脚本文件的所有请求。
默认情况下,脚本资源会使用 GZIP 自动压缩以进行 HTTP 传输。
Web Resources are handled by the AssemblyResourceLoader class, which is designed to retrieve assembly resources and serve them to the Web browser. Web Resources are not compressed by default.
Script Resources are handled by the ScriptResourceHandler class, which takes care of all requests for embedded script files that are referenced through the ScriptManager class.
Script Resources are automatically compressed with GZIP by default for HTTP delivery.