HcDoDynamicCompression Metabase Property
Applies To: Windows Server 2003, Windows Server 2003 with SP1
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.
Note
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:
To enable dynamic content compression server-wide, set the HcDoDynamicCompression property to true at the IIsCompressionSchemes level. You can then disable dynamic content compression settings for an individual Web site or site element, for example, a virtual directory or file, by using the DoDynamicCompression Metabase Property at the individual site or site element level.
To disable dynamic content compression server-wide, set the HcDoDynamicCompression property to false at the IIsCompressionSchemes level. You can then enable dynamic content compression settings for an individual Web site or site element, for example, a virtual directory or file, by using the DoDynamicCompression Metabase Property at the individual site or site element level.
Important
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.
Attribute Name | Attribute Value |
---|---|
XML Data Type |
Boolean |
WMI Data Type |
Boolean |
ADSI Data Type |
Boolean |
ABO Data Type |
Boolean |
ABO Metabase Identifier |
MD_HC_DO_DYNAMIC_COMPRESSION |
Attributes |
NO_ATTRIBUTES |
Default Value |
false |
MetaFlagsEx |
CACHE_PROPERTY_MODIFIED |
User Type |
IIS_MD_UT_SERVER |
ID |
2213 |
Configurable Locations
You can configure this property at the following locations in the IIS metabase.
Metabase Path | IIS Admin Object Type |
---|---|
/LM/W3SVC/Filters/Compression/gzip /LM/W3SVC/Filters/Compression/deflate |
IIsCompressionScheme |
/LM/W3SVC/Filters/Compression/Parameters |
IIsCompressionSchemes |
Code Example
For general code examples, see Code Examples to Configure Metabase Properties.