ReviewHostingASP.NET – There are often requests enlarged to the web server with lot of static content. These content can be compressed by reducing the bandwidth on requests.

The following setting is only available in IIS 7 and later:

The above configuration setting has direct association with IIS and nothing to with ASP.NET. The urlCompression name sounds strange but it is not really the compressing of URLs. It is compressing or gzipping the content and that sent to the browser. By setting to true/enabling you can gzip content sent to the browser while saving lots of bandwidth. Also notice that the above settings does not only include static content such as CSS/JavaScript, but also dynamic content such as .aspx pages or razor view.

If your web server is running in Windows Server 2008 R2 (IIS7.5), these settings are enabled by default. For other server environments, you would want to tweak the configuration as I just showed, so that you can take the advantage of compression.

JavaScript and CSS Compression

Minify is a PHP5 app that can combine multiple CSS and Javascript files, compress their contents (i.e. removal of unnecessary whitespace/comments), and serve the results with HTTP encoding (gzip/deflate) and headers that allow optimal client-side caching. There are also some web services that allow you to manually compress your Javascripts and CSS files online:



ASP.NET Web Performance Optimization: File Compression