zoukankan      html  css  js  c++  java
  • IIS7启用静态压缩

    IIS7启用压缩的操作如下图:

     

    默认情况下IIS7是启用GZip压缩的,但是有时候我们会发现谁然启用了压缩但是一些js和css文件仍然没有被压缩,这个时候需要修改一下IIS 的配置文件:

    在C:WindowsSystem32inetsrvconfig文件夹下找到applicationhost.config文件,打开之后找到如下一节内容:

    <httpCompression directory="%SystemDrive%inetpub	empIIS Temporary Compressed Files">
    <scheme name="gzip" dll="%Windir%system32inetsrvgzip.dll" />
    <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/javascript" enabled="true" />
    <add mimeType="*/*" enabled="false" />
    </staticTypes>
    </httpCompression>
    将:
     <add mimeType="application/x-javascript" enabled="true" />
    <add mimeType="text/css" enabled="true" />
    加入到staticTypes节点,重启IIS。
  • 相关阅读:
    python学习day3--python基础
    python学习day2--python基础
    python学习day1--python基础
    包导入原则
    模块搜索路径
    继承顺序
    继承,派生,组合
    面向对象程序设计
    类和对象
    递归
  • 原文地址:https://www.cnblogs.com/miaochw/p/3601653.html
Copyright © 2011-2022 走看看