Remove Vary Header

Use this behavior to determine how to handle the caching of responses if they incorporate the Vary header.

How it works

The Vary header is often used to indicate varied content in the response even though the URL is the same. For example, content can vary based on its associated language. Responses that contain a Vary header with a value of anything other than Accept-Encoding (with a corresponding Content-Encoding: gzip header) aren't cached by ​Akamai​ edge servers.

Implementation

To enable caching of these responses via Akamai Edge servers, you must remove the Vary header. You can accomplish this in one of two ways:

  • Remove the Vary header at the origin server. It isn't needed here. (This is the preferred method.)
  • Include the Remove Vary Header behavior in your property and set it to ON. This will remove Vary headers other than "Vary: Accept-Encoding" from the response.

AMD & Object Delivery and the Vary header

As a best practices setting, configurations for the Adaptive Media Delivery (AMD) and Object Delivery products assume that all content is cacheable. So, the Vary HTTP Header is removed by default, before content is cached. The Remove Vary Header behavior is automatically included in the property, in the background, and it's set to ON. This can be reversed, if necessary. However, a warning message is displayed stating that you're deviating from the best practices established for these products. This warning is informational, only.