1

Possible Duplicate:
How can I get gzip compression in IIS7 working?

I have enabled static compression on iis7.5 but my .js and .css files are not getting compressed.

my web.config

<staticContent><remove fileExtension=".js" />
  <mimeMap fileExtension=".js" mimeType="text/javascript" />
</staticContent><httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
  <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
  <dynamicTypes>
    <add mimeType="text/*" enabled="true"/>
    <add mimeType="message/*" enabled="true"/>
    <add mimeType="application/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>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>

Still YSlow Grad: F. Any ideas?

Community
  • 1
  • 1
balaji
  • 1,236
  • 2
  • 18
  • 28
  • does why-slow something in GZIP(KB) column with values? Some time firewall unzip the response sent by the ISS. I have faced the same problem and the network team told me the firewall can unzip the response before sending sending or your firewall from where you are accessing can unzip – शेखर Dec 29 '12 at 08:12
  • No.It is empty and also i checked with "http://www.gidnetwork.com/tools/gzip-test.php" – balaji Dec 29 '12 at 08:18

1 Answers1

0

change this line:

    <add mimeType="application/javascript" enabled="true"/>

to:

    <add mimeType="text/javascript" enabled="true"/>

for both entries (under dynamictypes and static types).

Masu
  • 1,568
  • 4
  • 20
  • 41