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.
To add an accept-encoding definition to a configuration: