Automatically minify and combine JavaScript and CSS files in any web site
page 4 of 8
by Matt Perdeck
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 54637/ 49

Server compression

If you are interested in web site performance, you may be interested in this short digression into server compression.   

IIS 6 and 7, and Apache as well, provide the option to gzip compress all text files (html, JavaScript, CSS, etc.) sent to the browser.  All modern browsers know how to decompress those files. Compression can save you a lot of bandwidth and download time. It is not uncommon to reduce file sizes by way over 50%.  

In IIS, compression is switched off by default for dynamic files, such as .aspx files. This is because it increases the load on the CPU. However, with the overabundence of CPU cycles on modern server hardware, switching on compression for dynamic files on your server is almost always a great idea. Also, IIS 6 and 7 allow you to set the compression level, so you can choose a level that you're comfortable with. Finally, IIS 7 can automatically switch off compression when CPU usage goes over a predetermined level (set by you), and switch it back on after CPU usage has dropped below a second level (also set by you). It even lets you cache compressed dynamic files, which makes compression extremely attractive.  

Switching on basic compression on IIS 7 is easy, but getting the most out of it is a bit tricky.  Switching on compression in IIS 6 is just tricky. Good places to find out more would be

·         http://www.iis.net/ConfigReference/system.webServer/httpCompression (for IIS 7); and

·         http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true (for IIS 6)   

Or you could read chapter 10 of my book ASP.NET Performance Secrets (https://www.packtpub.com/asp-net-site-performance-secrets/book) where it is all spelt out in one place (believe me, this will save you a lot of time).     


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-28 4:56:00 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search