Sun Java System Web Server 7.0 Update 5 Administrator's Guide

Configuring the Server to Serve Pre-Compressed Content

You can configure the server to generate and store pre-compressed versions of files in a specified directory. When configured, and only if an Accept-encoding: gzip header is received, all requests for files from a directory configured to serve pre-compressed content are redirected to requests for an equivalent compressed file from that directory, if such a file exists. For example, if the Web server receives a request for myfile.html, and both myfile.html and myfile.html.gz exist, then those requests with an appropriate Accept-encoding header receive the compressed file.

To configure your server to serve pre-compressed content, perform the following steps:

ProcedureTo Change Pre-compressed Content Settings

  1. From the virtual server page, click the Content Management tab.

  2. Click the General sub tab.

  3. Go to the Compression > Precompressed Content section and select from the following options.

    • Precompressed Content — Enable/Disable. enables you to instruct the server to serve pre-compressed content for the selected resource.

    • Age Checking — Specifies whether to check if the compressed version is older than the non-compressed version.

      If selected, then the compressed version, even if it is older than the non-compressed version, will not be checked.

    • Insert Vary Header — Specifies whether to use a Vary: Accept-encoding header.

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

      If not selected, then a Vary: Accept-encoding header is never inserted.

  4. Click Save.