在IIS静态COM pression没有为HTM,js文件工作 [英] Static compression in IIS does not work for htm, js files

查看:148
本文介绍了在IIS静态COM pression没有为HTM,js文件工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想IIS 7.5配置为COM preSS HTM静态和js文件。有谁知道为什么它不适合我?这里是我的网站的web.config:

I'm trying to configure IIS 7.5 to compress static htm and js files. Does anyone know why it does not work for me? Here is my web.config for the web site:

    <httpCompression>          
        <dynamicTypes>
            <add mimeType="text/*" enabled="true" />
            <add mimeType="message/*" enabled="true" />
            <add mimeType="application/x-javascript" enabled="true" />
            <add mimeType="*/*" enabled="false" />
        </dynamicTypes>
        <staticTypes>
            <add mimeType="text/*" enabled="true" />
            <add mimeType="message/*" enabled="true" />
            <add mimeType="application/x-javascript" enabled="true" />
            <add mimeType="*/*" enabled="false" />
        </staticTypes>
    </httpCompression>
    <urlCompression doStaticCompression="true" doDynamicCompression="false" />

的COM pression开始工作时,我设置doDynamicCom pression为true。但由于它是在我的托管服务被禁用,我不能使用此选项。

Compression starts working when I set doDynamicCompression to true. But I can't use this option because it is disabled at my hosting.

感谢您。

推荐答案

<一个href=\"http://weblogs.asp.net/anilkasalanati/archive/2010/12/29/enabling-http-caching-and-com$p$pssion-in-iis-7-for-asp-net-websites.aspx\"相对=nofollow称号=启用HTTP缓存和COM pression在IIS 7 asp.net网站 - 阿尼尔Kasalanati>在IIS 7中启用HTTP缓存和COM pression的asp.net网站 - 安尼尔Kasalanati

这个怎么样? Checkyour applicationHost.config文件。

How about this? Checkyour applicationHost.config file.

这篇关于在IIS静态COM pression没有为HTM,js文件工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆