The Vary HTTP header

Many web servers add Vary HTTP headers to content by default. The Vary HTTP header allows applications to vary content based on the type of browser or other client property, which makes it difficult to cache content. As a Best Practices setting, AMD assumes that all content is cacheable and removes the Vary HTTP header by default before caching content.

If you want the Vary HTTP Header passed through to the client, you can add Remove Vary Header as an Optional Behavior:
  1. Click the Add Behavior button.
  2. Type "Remove" in the Search available behaviors field to filter the behaviors listed.
  3. Select the Remove Vary Header behavior, and click the Insert Behavior button.
  4. Set the Remove Vary Header slider to "Off".

As a result, AMD treats content as uncacheable unless there is a single Vary argument for gzipped delivery. In this case, if the Vary header is used for something other than compression purposes, AMD assumes that the content should not be cached, because it may be specific to the particular type of client.

AMD can only cache the associated object if the Vary header contains only Accept-Encoding, and Gzip is present in the Content-Encoding header.