Share via


Configuring HTTP Compression in IIS 7

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

If your sites use lots of bandwidth, or if you want to use bandwidth more effectively, enable compression to provide faster transmission times between IIS and compression-enabled browsers. If your network bandwidth is restricted, as it is, for example, with mobile phones, compression can improve performance.

IIS provides the following compression options:

  • Static files only

  • Dynamic application responses only

  • Both static files and dynamic application responses

Compression of dynamic application responses can affect CPU resources because IIS does not cache compressed versions of dynamic output. If compression is enabled for dynamic responses and IIS receives a request for a file that contains dynamic content, the response that IIS sends is compressed every time it is requested. Because dynamic compression consumes significant CPU time and memory resources, use it only on servers that have slow network connections but that have CPU time to spare.

Unlike dynamic responses, compressed static responses can be cached without degrading CPU resources.

Prerequisites

For information about the levels at which you can perform these procedures, and the modules, handlers, and permissions that are required for these procedures, see HTTP Compression Feature Requirements (IIS 7).

Procedures

This task includes the following procedures:

Configure Compression (IIS 7)

Enable HTTP Compression of Dynamic Content (IIS 7)

Enable HTTP Compression of Static Content (IIS 7)