Note that there are some explanatory texts on larger screens.

plurals
  1. POEnable gzip compression using MVC3
    text
    copied!<p>I am using the chrome extension YSlow to test my site performance.</p> <p>I've got F Grade on Compress components with gzip.</p> <p>There are 15 plain text components that should be sent compressed:</p> <pre><code>http://localhost:21964/Content/custom/css/blog.css http://localhost:21964/Content/custom/css/style.css http://localhost:21964/Content/custom/css/socialize-bookmarks.css http://localhost:21964/Content/custom/css/prettyPhoto.css http://localhost:21964/Content/custom/css/flexslider.css http://localhost:21964/Content/custom/css/colors/color-orange.css http://localhost:21964/Content/sc2.css http://localhost:21964/Content/custom/javascript/custom.js http://localhost:21964/Content/custom/javascript/header.js http://localhost:21964/Content/custom/javascript/twitter.js http://localhost:21964/Content/custom/javascript/bra.photostream.js http://localhost:21964/Content/custom/javascript/jquery.flexslider.js http://localhost:21964/Content/custom/javascript/jquery.bpopup-0.7.0.min.js http://localhost:21964/Content/custom/javascript/prettyPhoto.js http://localhost:21964/css/colors/color-orange.css </code></pre> <p>Compression reduces response times by reducing the size of the HTTP response. Gzip is the most popular and effective compression method currently available and generally reduces the response size by about 70%. Approximately 90% of today's Internet traffic travels through browsers that claim to support gzip.</p> <p>There was a similar post <a href="https://stackoverflow.com/questions/6992524/how-do-i-enable-gzip-compression-when-using-mvc3-on-iis7">here</a>, But even though I've followed these steps it doesn't compress the traffic.</p> <p>Steps I've done:</p> <ol> <li>I ticked all the compression settings in the IIS -> Compression.</li> <li>Activate the Windows Feature "Dynamic Content Compression".</li> <li>I've added this lines to the <code>web.config</code>:</li> </ol> <p><code></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="true"/&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="true"/&gt; &lt;/staticTypes&gt; &lt;/httpCompression&gt; &lt;urlCompression doStaticCompression="true" doDynamicCompression="true" /&gt; ... &lt;/system.webServer&gt; </code></pre> <p></code></p> <p>I am currently using the Developer Server inside the project Properties -> Web -> Servers</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload