title: how to enabled gzip in asp.net?
body: <p>i want gzip css and js file in website. and use this code in web.config:</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"&gt;
    &lt;scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/&gt;
    &lt;dynamicTypes&gt;
      &lt;add mimeType="text/*" enabled="true"/&gt;
      &lt;add mimeType="message/*" enabled="true"/&gt;
      &lt;add mimeType="application/javascript" enabled="true"/&gt;
      &lt;add mimeType="*/*" enabled="false"/&gt;
    &lt;/dynamicTypes&gt;
    &lt;staticTypes&gt;
      &lt;add mimeType="text/*" enabled="true"/&gt;
      &lt;add mimeType="message/*" enabled="true"/&gt;
      &lt;add mimeType="application/javascript" enabled="true"/&gt;
      &lt;add mimeType="*/*" enabled="false"/&gt;
    &lt;/staticTypes&gt;
  &lt;/httpCompression&gt;
  &lt;urlCompression doStaticCompression="true" doDynamicCompression="true"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>analyze my website with gtmetrix.com site, but get:</p>
  
  <pre><code>Compressing the following resources with gzip could reduce their transfer size by 63.4KiB (77% reduction).
  
  Compressing http://mysite.com/ could save 30.6KiB (74% reduction).
  Compressing http://mysite.com/WebResource.axd?d=TdZvTxV1RZCMol6igoEA7XxfdqcWpTRlYuCxfymg_ruU4xc1NuSqLn7bduKh3WyPwSYX0g86d6fEJ3SVBdeWi5FBnMpKfcO7aaFoqvmTo_c1&amp;t=634970873020000000 could save 17.5KiB (80% reduction).
  Compressing http://mysite.com/main.css could save 14.8KiB (80% reduction).
  </code></pre>