In IIS6, static code is not processed by managed HttpModules ; it requires its own ISAPI.
One trick you can use is to convert your * .js and * .css files to dynamic files. You do this by modifying them as * .aspx and setting the ContentType in the correct MIME type. For instance:
this.Response.ContentType = "application/x-javascript";
The only trick is to set StyleSheetTheme="" in the "Page" directive in the markup file. Otherwise, the runtime will insist on the <head> section in the document. You can enable output caching to minimize performance impact.
I wrote a blog post about this on the JS side if that helps (CSS is similar, just with a different MIME type): http://www.12titans.net/p/dynamic-javascript.aspx
Unfortunately, this requires changing the name of your JS and CSS files in your application, but if you want compression and don't have access to IIS, I don't think there is a way around this.
If you want to save the * .js and * .css extensions, you can do this by adding a handler for them in your web.config. For instance:
<compilation> <buildProviders> <add extension=".css" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders> </compilation> <httpHandlers> <add path="*.css" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true"/> </httpHandlers>
This helps in terms of naming, but not performance; the files will still be dynamic - these are mostly * .aspx files, but with a different extension. It also does not work correctly with ASP.NET themes, because the pages in the Themes folder cannot be dynamic, regardless of their extension.
source share