Chapter 10. Compression
Using compression is the single most important way to reduce load times. The .aspx
files sent by the server to the browser consist of HTML. HTML is highly compressible by algorithms such as GZIP. Because of this, modern web servers, including IIS 5 and later, have the ability to compress outgoing files, and modern browsers have the ability to decompress incoming files.
A disadvantage of compression is that it is CPU-intensive. Because of this, IIS 7 by default compresses only static files, because their compressed versions are cached. Dynamic files, however, may be different for each request and therefore cannot be cached easily by IIS. So, they are not compressed by default.
In this chapter, we'll go through the following:
How server and browser agree on compression
How to switch compression on or off for dynamic and static files for both IIS 6 and IIS 7
Setting the compression level, allowing you to trade off more CPU usage for higher compression
Disabling compression...