With the help of YSlow I'm trying to tune my pages a bit.
I thought it would be little effort for big gain to have my pages compressed.
After trying everything from here, here, here and here YSlow is still showing my pages are nog compressed.
I'm using asp.net mvc 1.0 on IIS6.
With the following rules in my global.asax I make sure that my static content is not handled by MVC.
routes.Clear();
// Turns off the unnecessary file exists check
routes.RouteExistingFiles = true;
// Ignore text, html, files.
routes.IgnoreRoute("{file}.txt");
routes.IgnoreRoute("{file}.htm");
routes.IgnoreRoute("{file}.html");
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
// Ignore the content directory which contains images, js, css & html
routes.IgnoreRoute("Content/{*pathInfo}");
//Exclude favicon (google toolbar request gif file as fav icon which is weird)
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.([iI][cC][oO]|[gG][iI][fF])(/.*)?" });
This will make sure that my js and css files are statically accessible.
These are the relevant snips of my metabase.xml
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="9"
HcFileExtensions="htm
html
txt
css
js
mvc"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="9"
HcFileExtensions="htm
html
txt
css
js
mvc"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe"
>
</IIsCompressionScheme>
(meta: not sure if I should be putting this on SO or on SF)