Configuring HTTP Compression

To configure HTTP compression, follow these steps:

  1. In the console tree of ISA Server Management, click General:

    • For ISA Server 2004 Enterprise Edition, expand Microsoft Internet Security and Acceleration Server 2004, expand Arrays, expand Array_Name, expand Configuration, and then click General.
    • For ISA Server 2004 Standard Edition, expand Microsoft Internet Security and Acceleration Server 2004, expand Server_Name, expand Configuration, and then click General.
  2. Under Global HTTP Policy Settings, click Define HTTP Compression Preferences to open the HTTP Compression properties.

    Cc302509.06ba6636-491b-4437-b509-5dd482cee40f(en-us,TechNet.10).gif

  3. On the Settings tab, you can add the network entities for which HTTP compression will be requested from or allowed to. Click Add to open the Add Network Entities dialog box, select a network entity, and then click Add. Repeat to add additional network elements, and then click Close. Note that the list of network entities is ordered, so you can set a preference for compression between the network entities. Use the arrows on the right side of the property page to change the order of the network elements. Highlight each network element to select it and click Set Compression to set the compression properties.

    Cc302509.3f5d6637-c69c-4fd8-b6cd-8643dab01957(en-us,TechNet.10).gif

  4. In the Set Compression dialog box, you can select:

    • Reply with compressed HTTP content. With this option enabled, ISA Server returns compressed content when a client request from this network element asks for compression.
    • Request compressed HTTP content from servers. With this option enabled, ISA Server asks for compressed content when making requests to this network element.
  5. After you configure the compression settings for the network element, click OK to close the Set Compression dialog box.

    Cc302509.037b1cc3-8857-4594-b53b-f8ac2b194046(en-us,TechNet.10).gif

  6. On the Content Types tab, you can specify which content types will be compressed. You have the option of specifying the content types that will be excluded (all others will be included), or the ones that will be included (all others will be excluded). Then select specific content types to be excluded or included. The preceding figure is an example of a configuration in which only HTML documents will be compressed. You can create new content types in the Firewall Policy task pane, on the Toolbox tab, as described in ISA Server Help.

    Note

    The following content types cannot be compressed because they are already compressed, or cannot be compressed because they are provided as a stream:

    • video
    • audio
    • application/x-tar
    • x-world/x-vrml
    • application/zip
    • application/x-gzip
    • application/x-zip-compressed
    • application/x-compress
    • application/x-compressed
    • application/x-spoon@@
      Cc302509.ce9a48de-df4b-4afb-bb59-c0df0c6bfe6c(en-us,TechNet.10).gif
  7. On the Content Inspection tab, you can select whether ISA Server Web filters will inspect the incoming compressed content. To do so, the compressed content will have to be decompressed. When decompressed, the content is stored in the cache as decompressed text. If ISA Server receives a request for the cached content, it recompresses it before sending, which increases response time.

  8. After you complete the configuration, click Apply in the ISA Server details pane to apply the changes.

Configuring Minimum Size Packet and Range Compression

There are two packet prioritization properties that cannot be set through ISA Server Management. These properties are:

  • The minimum size of the packet to be compressed. Because you do not want to compress and decompress small packets, you can configure the minimum size packet (in bytes) that will be compressed. The default value for the minimum size is 36 bytes.
  • Support of range compression. Internet Information Services (IIS) does not support range compression. Therefore, you do not want to allow range compression on the network that includes a server running IIS. However, because ISA Server does support range compression, you may want to enable it between two ISA Server computers. For example, if you have a Web server in the main office, you would disable range compression on the Internal network for the main office, but enable it on the External network for the main office and for the branch offices, so that range compression takes place between the offices.

These parameters are listed in an .xml file that is stored as a vendor parameters set under the Web Proxy container in the storage.

To set the priorities configuration

  1. Create an .xml file. (For an example, see Sample of XML Configuration File in this document.) You can create the .xml file by configuring HTTP compression through ISA Server Management, and then exporting the configuration using the SetCompConfig.vbs file. The syntax for using this script for export is:

    SetCompConfig.vbs export filename
    
  2. Replace or edit the configuration by editing the .xml file and rerunning the script on the modified file. Run SetCompConfig.vbs with your .xml file as a parameter. This tool will read the .xml file into the ISA Server storage. SetCompConfig.vbs is provided at the Microsoft Windows Server System Web site.

The syntax for using this script for import is:

SetCompConfig.vbs import filename

Sample of XML Configuration File

The following is an example of the .xml configuration file:

<Compression ContentInspectionIsRequired="false"
  MinimumCompressionLength="36"
  MemAllocCompression="256">
 <NetworksElements>
   <NetworkElement
      Name="Internal"
   Type="Network"
   ClientCanAskForCompression="true"
   ServerShouldCompressResponse="false"
   CompressRange="false"
   StorageName="{4E32B556-0FAF-4A27-9111-085F679EDC9B}" />
  <NetworkElement
      Name="External"
   Type="Network"
   ClientCanAskForCompression="false"
   ServerShouldCompressResponse="true"
   CompressRange="true"
   StorageName="{F129EACF-778B-44FE-B339-5B752D7220A3}" />
  </NetworksElements>
 <ContentTypes CompressOnlyFollowingContentType="false">
   <ContentType
   Name="Images"
   StorageName="{2f203d1d-9ca0-414a-b036-fc9c585677ab}" />
   <ContentType
      Name="Video"
   StorageName="{7d3e566c-e96c-4cd4-b6aa-8181a8386c8e}" />
 </ContentTypes>
</Compression>

[Topic Last Modified: 12/16/2008]