IIS7中的url压缩是什么?
在我的 ASP.NET web.config 中,我有以下内容:
<urlCompression doDynamicCompression="true" />
我到这里寻找答案:
http://www.iis.net/ConfigReference/system.webServer/urlCompression
...但它并没有真正解释什么是 URL 压缩。谁能对此做出简单的解释?
In my ASP.NET web.config, I have this:
<urlCompression doDynamicCompression="true" />
I went here to find an answer:
http://www.iis.net/ConfigReference/system.webServer/urlCompression
...but it doesn't really explain what URL compression is. Can anyone give a bare-bones explanation of this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简而言之:
doDynamicCompression
告诉 IIS 是否应该压缩动态生成的内容,即由脚本(ASP、PHP、ASP.NET 等)生成的内容。doStaticCompression
告诉 IIS 是否压缩文件系统上实际存在的静态文件,例如 PDF、JPEG 等。这里的答案进一步解释了
urlCompression
和httpCompression
之间的区别:要控制如何压缩内容(静态或动态),您需要指定
设置。通过此设置,您可以控制压缩方案(gzip 或 deflate)、压缩内容的存储位置、磁盘空间限制压缩内容,CPU 限制压缩内容等。您还可以对可压缩的不同内容类型(mime 类型)指定更细粒度的控制。In a nutshell:
doDynamicCompression
tells IIS whether it should compress dynamically generated content, i.e. content generated by your scripts (ASP, PHP, ASP.NET etc).doStaticCompression
tells IIS whether to compress static files e.g. PDF's, JPEGS etc that actually exist on the file system.This answer here then further explains the difference between
urlCompression
andhttpCompression
:To control how content (static or dynamic) is compressed you would then specify the
<httpCompression>
setting. With this you can control the compression scheme (gzip or deflate), where compressed content is stored, disk space limits for compressed content, CPU limits when compressing content etc. You can also specify more fine grained control over the different content types (mime types) that can be compressed.