Business support

Adding an accept-encoding definition to a configuration

You can use the accept-encoding header field in client requests to indicate what content codings are acceptable in the response. The accept-encoding feature normalizes a client’s accept-encoding header to identity (no encoding) and gzip (if included in the client’s request). Any other encoding types are dropped from the client’s request by default. Normalization of the accept-encoding: header improves cache efficiency by reducing the variation of the accept-encoding value. For example, the following headers are semantically equivalent but not bytewise equivalent:

Accept-encoding: gzip, default, identity accept-encoding: identity, gzip, deflate

With the default normalization feature enabled, the above requests would be normalized to:

Accept-encoding: gzip, identity

The accept-encoding feature is enabled by default and applies to all requests. You can modify the list of supported encodings based on the file extension present in the request. For example, for image files (e.g., .jpeg, .jpg, .gif, etc.), the origin server likely supports only identity encoding (since these files are already compressed) so it makes sense to avoid considering encodings other than identity when processing the client’s request. For text-based file extensions (e.g., .html, .htm, .txt, .css, etc.), it makes sense to consider requests for compressed encodings, with gzip being by far the most common (making it the default), but with other encodings (e.g., sdch) being optionally configurable. Configuring different compression types does not cause the CDN to perform the compression on the origin’s behalf. If encodings are defined that the origin server does not support, they will not be returned to the client.

Finally, note that the normalization process maintains the relative encoding preferences in the client’s accept-encoding header for the supported encodings, never adds an encoding the client did not specify, and preserves a client’s specification that a given encoding is not acceptable. Normalization never causes the CenturyLink CDN to serve an encoding that was not requested or that the client has specified as unacceptable.

Get help opening a configuration

To add an accept-encoding definition to a configuration:

  1. From an open configuration, click Edit Configuration.
  1. In the Service-Wide Definition section, click Accept-Encoding.

    Media portal lists the accept-encoding definitions for the configuration (if any).
  1. Click Add Definition.
  1. Type a name for the definition. (You can leave the auto-generated name or type a name more meaningful to you.)
  1. Add extensions to the definiton:

    1. Type an extension in the field.

    2. To add additional extensions, click Add, then fill in the field.
  1. Add compression types to the definition:

    1. Type the compression type in the field.

    2. To add additional compression types, click Add, then fill in the field.
  1. To make this definition the default accept-encoding definition for the configuration, click the Default checkbox.
  1. If you need to edit or add other definitions, continue editing the configuration without saving. (Saving the configuration creates a new version.) When you're done editing the configuration, continue with step 9.

  2. Click Save (above the Service-Wide Definition section). You can also click Save As to save the configuration under a new name.
  1. If needed, add any notes to describe the changes you made.

  2. Click Save again.

    Media portal saves the configuration with the new definition.