HcDoDynamicCompression Metabase Property (IIS 6.0)
The HcDoDynamicCompression property specifies whether responses to requests for dynamic content, such as scripts in ASP pages and ISAPI extensions are compressed. Setting HcDoDynamicCompression to true, indicates that dynamic content is compressed when requested by a client. If dynamic compression is enabled, each request for dynamic content that contains the "Accept-Encoding: gzip" or "Accept-Encoding: deflate" header causes the content to be compressed, as long as the compression scheme that is specified in the header is enabled in IIS. If the request does not contain this header, or the header specifies a compression scheme that is not enabled in IIS, the content is not compressed.
Because dynamic content is always changing, IIS does not cache compressed versions of dynamic content. Dynamic compression consumes considerable CPU time and memory resources, and should only be used on servers that have slow network connections and CPU time to spare.
At the individual compression scheme level (IIsCompressionScheme), the HcDoDynamicCompression property determines which compression schemes IIS will support for dynamic content: gzip, deflate, or both.
You can either enable compression of dynamic content server-wide and then disable it at specific locations, or you can disable compression of dynamic content server-wide and then enable it only at the locations you specify. To enable and disable dynamic compression by using the HcDoDynamicCompression property, do the following:
If you change the value of the HcDoDynamicCompressionproperty at the IIsCompressionScheme level, the World Wide Web Publishing Service (WWW service) must be restarted before the change takes effect.
You can configure this property at the following locations in the IIS metabase.
For general code examples, see Code Examples to Configure Metabase Properties.