Use the Compression feature page to provide faster transmission times between IIS and compression-enabled browsers. Compression is helpful if your site uses lots of bandwidth, or if you want to use bandwidth more effectively. Compression can improve performance if your network bandwidth is restricted as it is, for example, with mobile phone clients. Compression also helps improve performance in a data center environment.

IIS provides the following compression options:

  • Static files only

  • Dynamic application responses only

  • Both static files and dynamic application responses

UI Element List

The following tables describe the UI elements that are available on the feature page and in the Actions pane.

Feature Page Elements

Element NameDescription

Enable static content compression

Configures IIS to compress static content.

Note

Unlike dynamic responses, compressed static responses can be cached on disk across multiple requests without degrading CPU resources. On the next request, a compressed file can be retrieved from disk, which improves performance because the CPU does not have to compress the file again.

Enable dynamic content compression

Configures IIS to compress dynamic content.

Note

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 resource that contains dynamic content, the response that IIS sends is newly compressed every time it is requested. Because dynamic compression consumes significant CPU time and memory resources, use it only on servers that have clients with slow network connections but that have CPU time to spare.

Only compress files larger than (in bytes)

Defines the minimum file size that you want IIS to compress. The default size is 256 bytes.

Note

This option is available at only the server level.

Cache directory

Defines the path of a local directory where a static file is cached after it is compressed, either until it expires or until the content changes. For security reasons, this temporary directory must be on a local drive on an NTFS-formatted partition. The directory cannot be compressed, and should not be shared.

Note

This box is available at only the server level.

Per application pool disk space limit (in MB)

Sets the maximum amount of space, in megabytes, you want IIS to use when compressing static content. When this setting is defined, IIS automatically empties the temporary directory when the set limit is reached. The default limit is 100 MB per application pool.

Note

This option is available at only the server level.

Actions Pane Elements

Element NameDescription

Apply

Saves the changes that you have made on the feature page.

Cancel

Cancels the changes that you have made on the feature page.

See Also


Table Of Contents