大佬教程收集整理的这篇文章主要介绍了IIS 7.5 ASP.NET-4 Gzip压缩,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
未压缩的CSS文件的响应头是:
Content-Type text/css Last-Modified Mon,09 Aug 2010 20:10:34 GMT Accept-Ranges bytes Etag "5d71bdecfe37cb1:0" Server Microsoft-IIS/7.5 Date Sat,28 Aug 2010 14:33:56 GMT Content-Length 3364
而对于一个被压缩的Javascript文件(scriptresource.axd):
Cache-Control public Content-Type application/x-javascript Content-Encoding gzip Expires Sun,28 Aug 2011 14:33:50 GMT Last-Modified Sat,28 Aug 2010 14:33:50 GMT Server Microsoft-IIS/7.5 Date Sat,28 Aug 2010 14:33:56 GMT Content-Length 478
在applicationHost.config中:
<httpCompression sendCacheHeaders="false" directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" noCompressionForRange="true"> <scheR_62_11845@e name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /> <staticTypes> </staticTypes> <dynamicTypes> </dynamicTypes> </httpCompression>
并在应用程序web.config中:
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" /> <httpCompression noCompressionForRange="false" noCompressionForhttp10="false" noCompressionForProxies="false" > <dynamicTypes> <add mimeType="text/css" enabled="true" /> </dynamicTypes> <staticTypes> <add mimeType="text/css" enabled="true" /> </staticTypes> </httpCompression>
有谁能告诉我什么设置我失踪了?
以上是大佬教程为你收集整理的IIS 7.5 ASP.NET-4 Gzip压缩全部内容,希望文章能够帮你解决IIS 7.5 ASP.NET-4 Gzip压缩所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。