次の方法で共有


HcDoDynamicCompression

The HcDoDynamicCompression property specifies whether responses to requests for dynamic content, such as such as 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, so long as the compression scheme 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.

Important Because dynamic content is by definition 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, but CPU time to spare.

At the individual compression scheme level (IIS Admin Object Hierarchy), 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 as needed, or, you can disable compression of dynamic content server-wide, and then enable it only at the locations you specify.

To enable dynamic content compression server-wide, set the HcDoDynamicCompression property to true at the IIS Admin Object Hierarchy 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 property at the individual site or site element level.

To disable dynamic content compression server-wide, set the HcDoDynamicCompression property to false at the IIS Admin Object Hierarchy 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 property at the individual site or site element level.

If you change the value of this property at the IIS Admin Object Hierarchy level, the World Wide Web Publishing Service (WWW service) must be restarted before the change takes effect.

Schema Attributes

Attribute Name

Value

ADSI/WMI Data Type

BOOL

ABO Data Type

DWORD_METADATA

Schema Default

FALSE

Internal Default

FALSE

Upper Bound

0

Lower Bound

Not specified

Internal ID

2213

Friendly ID

MD_HC_DO_DYNAMIC_COMPRESSION

Property Attributes

NO_ATTRIBUTES

User Type

IIS_MD_UT_SERVER

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

Flags

There are no flags for this property.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also