Esta página foi útil?
Os seus comentários sobre este conteúdo são importantes. Dê-nos a sua opinião.
Comentários adicionais?
1500 caracteres restantes
Exportar (0) Imprimir
Expandir Todos

HcDoOnDemandCompression Metabase Property

The HcDoOnDemandCompression property specifies whether static files, such as .htm and .txt files, are compressed if a compressed version of the file does not exist in the compression directory specified by HcCompressionDirectory Metabase Property.

For on-demand compression of static files to occur, HcDoOnDemandCompression must be set to true at the global (IIsCompressionSchemes) level and at least one compression scheme (IIsCompressionScheme) level. The supported compression schemes are gzip and deflate. For information about the levels that this property can be set, see the Access Locations table.

If HcDoOnDemandCompression is set to true at the IIsCompressionScheme level and at least one IIsCompressionSchemes level, and IIS receives a request for static content, IIS checks the compression directory. If a corresponding compressed version of the requested file is not found, IIS will send an uncompressed version of the requested file to the client browser, while a background thread compresses the requested file. The newly compressed file is then stored in the compression directory, and subsequent requests for that file are serviced directly from the compression directory. In other words, an uncompressed version of the file is returned to the client, unless a compressed version of the file already exists in the compression directory.

If HcDoOnDemandCompression is set to false, at the global level, IIS does not compress static content files when a corresponding compressed version is not found in the compression directory.

If you change the value of HcDoOnDemandCompression at the individual compression scheme level, the World Wide Web Publishing Service (WWW service) must be restarted for the change to take effect.


Attribute Name Attribute Value

XML Data Type


WMI Data Type


ADSI Data Type


ABO Data Type


ABO Metabase Identifier




Default Value




User Type




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




Code Example

Considera isto útil?
(1500 caracteres restantes)
Obrigado pelos seus comentários

Conteúdo da Comunidade

© 2015 Microsoft