Sun Java System Web Server 6.1 SP11 Administrator's Guide

ProcedureTo configure your server to compress content on demand

  1. From the Class Manager, click the Content Management tab.

  2. Click Compress Content on Demand.

  3. Enter the following information:

    • Editing. Select the resource from where compressed content will be served dynamically on demand from the drop-down list. If you choose a directory, the server will serve compressed content only when the server receives a URL for that directory or any file in that directory.

      Click the Browse button to browse the primary document directory, or click the Wildcard button to specify a wildcard pattern. For information on using wildcard patterns, see Wildcards Used in the Resource Picker.

      • Activate Compress Content on Demand? Choose whether the server should serve precompressed content for the selected resource.

      • Vary Header. Specify whether to insert a Vary: Accept-encoding header. Select either yes or no.

        If set to yes, then a Vary: Accept-encoding header is always inserted when a compressed version of a file is selected.

        If set to no, then a Vary: Accept-encoding header is never inserted.

        By default, the value is set to yes.

      • Fragment Size. Specifies the memory fragment size in bytes to be used by the compression library (zlib) to control how much to compress at a time. The default value is 8096.

      • Compression Level. Specifies the level of compression. Choose a value between 1 and 9. The value 1 yields the best speed; the value 9 the best compression. The default value is 6, a compromise between speed and compression.

  4. Click OK.