Performance - usando Http Compression

<< Click to Display Table of Contents >>

Navigation:  ASP.NET > Dicas avançadas > Performance >

Performance - usando Http Compression

Previous pageReturn to chapter overviewNext page

Para seu site ficar bem menor coloque isso no webconfig:

 

<configuration>

   <system.web>

       .....

   </system.web>

 

   <system.webServer>

       <urlCompression doStaticCompression="true" doDynamicCompression="true"/>

   </system.webServer>

 

Este exemplo parece mais completo (eu não vi diferença ainda)

 

   <system.webServer>

       <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"/>

   </system.webServer>

 

Confira no no Firebug

 

firebug

 

Fonte

 

http://jeeshenlee.wordpress.com/2010/08/01/how-to-gzip-on-asp-net-and-godaddy/