简体   繁体   中英

gzip compression on iis 7.5 using web.config file

I have hosted website in bizspark shared server on IIS, because of this i don't have access to iis manager on hosting server on bizspark. So I need to do gzip compression settings through web.config file but it is not getiing integrated on website.

I have tried below settings ,but issue not fixed

<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
  <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="4"/>
  <dynamicTypes>
    <add mimeType="text/*" enabled="true" />
    <add mimeType="message/*" enabled="true" />
    <add mimeType="application/x-javascript" enabled="true" />
    <add mimeType="application/json" enabled="true" />
    <add mimeType="image/jpeg" enabled="true" /> 
      <add mimeType="image/jpg" enabled="true" /> 
       <add mimeType="image/png" 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="application/atom+xml" enabled="true" />
    <add mimeType="application/xaml+xml" enabled="true" />
     <add mimeType="image/jpeg" enabled="true" /> 
      <add mimeType="image/jpg" enabled="true" /> 
       <add mimeType="image/png" enabled="true" /> 
    <add mimeType="*/*" enabled="false" />
  </staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true" />

By default, <httpCompression> cannot be overridden outside IIS's applicationHost.config , while <urlCompression> can be overridden in any way.

You have to check with server administrators before moving on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM