scheme Element for httpCompression [IIS Settings Schema]
Configures the GNU zip (Gzip) and Deflate compression schemes.
Syntax
Attributes and Elements
The following sections describe attributes, child elements, and parent elements for this section.
Attributes
Attribute |
Description |
---|---|
dll |
Required string attribute. Specifies the fully qualified file system path and file name of the compression DLL associated with the compression scheme. The World Wide Web Publishing Service (WWW service) must be restarted before any changes to this attribute take effect. |
doDynamicCompression |
Optional Boolean attribute. Specifies whether responses to requests for dynamic content, such as scripts in Active Server Pages (ASP) and ISAPI extensions, are compressed. Because this attribute cannot be inherited, it must be set to true at both the global level (httpCompression) and at the individual scheme level if the name attribute is set to Gzip. If this value is changed at the individual compression scheme level, the WWW service must be restarted before the change takes effect. The default value is true. |
doStaticCompression |
Optional Boolean attribute. Specifies whether IIS compresses responses to requests for static content. Because this attribute cannot be inherited, it must be set to true at both the global level (httpCompression) and the individual scheme level if the name attribute is set to Gzip. If this value is changed at the individual compression scheme level, the WWW service must be restarted before the change takes effect. Note The static compression store needs to be located in a disk partition or remote share formatted with NTFS. If the file store is not NTFS, static compression is disabled. For security reasons, no compressed responses will be served from a FAT cache store. The default value is true. |
dynamicCompressionLevel |
Optional integer attribute. Specifies the compression level for the compression scheme when dynamic content is being compressed. The levels range from 0 (lowest compression level and lowest CPU usage) to 10 (highest compression level and highest CPU usage). 0 means that compression is disabled. The WWW service must be restarted before any changes to this attribute take effect. Note Because dynamic compression consumes considerable CPU time and memory resources, use it only on servers that have slow network connections but CPU time to spare. Compressed static responses can be cached and, therefore, do not affect CPU resources like dynamic responses do. The default value is 0. |
name |
Required string attribute. Specifies the name of the compression scheme, for example, Gzip or Deflate. |
staticCompressionLevel |
Optional integer attribute. Specifies the compression level for the compression scheme when static content is being compressed. The levels range from 0 (lowest compression level and lowest CPU usage) to 10 (highest compression level and lowest CPU usage). 0 means that compression is disabled. The WWW service must be restarted before any changes to this attribute take effect. The default value is 7. |
Child Elements
Element |
Description |
---|---|
remove |
Optional element. Removes a reference to an HTTP compression scheme from the HTTP compression scheme collection. |
clear |
Optional element. Removes all references to HTTP compression schemes from the HTTP compression scheme collection. |
Parent Elements
Element |
Description |
---|---|
configuration |
Specifies the root element in every configuration file that is used by IIS 7. |
system.webServer |
Specifies the root element in ApplicationHost.config that is the top-level section group in which this element is defined. |
httpCompression |
Configures HTTP compression settings for a Web server. |
Remarks
For more information about the scheme element, see the following topic on the Microsoft IIS.net Web site: Scheme <scheme>.
Element Information
Configuration locations |
Machine.config ApplicationHost.config Root level Web.config Application level Web.config Virtual or physical directory level Web.config |
Requirements |
Microsoft Internet Information Services (IIS) version 7.0 |
See Also
Reference
remove Element for scheme for httpCompression [IIS Settings Schema]
clear Element for scheme for httpCompression [IIS Settings Schema]