Performance Features

Advanced cache control

This feature allows URLs that usually are not visible by a visitor to be manipulated to enhance or respectively preserve cacheability.

Config

To use the advanced cache control feature, enable the advanced-cache-control option in your conf/config.xml:

<config>
  <acceleration>
    <advanced-cache-control [ low-precision-viewport="true" ] />
  <acceleration>
</config>

Vary: User-Agent

FIT usually tailors responses that are made for a unique client. For detecting those clients the most significant attribute is the User-Agent request header. And because this header is so significant in creating a correct delivery context the responses by FIT are served with the header Vary: User-Agent. This header can cause well known CDNs not to cache at all, which is particularly undesirable especially for data that could otherwise be cached publicly.

Unified caching mark

The unified caching mark - or short ucm - combines all the relevant information that decisions made by FIT base on, i.e.

  • FIT version
  • CDR version
  • Unique client ID as identified by the CDR
  • Some values of the detection cookies

This information is aggregated in the ucm mark, which is added to URLs that are

  • used in <script src="..."/>
  • used in <link rel="stylesheet" href="..."/>
  • used by FIT to request content via AJAX (as in partial page loading)
  • used by the web developer in the FIT Ajax API with the allowUCM option set to true

Matching client and server ucm

When a request to FIT contains a ucm mark in the URL and the advanced-cache-control setting is enabled in your configuration, FIT will calculate whether the information given by the client and the ucm in the URL match the information on the server.

If the information on client and server match FIT omits Vary: User-Agent and instead uses Cache-Control: public which usually is the most desired form of caching.

If the information on client and server do not match FIT omits the Vary: User-Agent too, but instead will respond with Cache-Control: private.

Using viewport breakpoints

Varying viewport dimensions of resizeable browser requests lead to different ucms, due to the diverse fitdetection cookies. This means, even though the window size might differ just slightly, the result is a different ucm and therefore no matching client and server ucms.

To enhance the cacheability of resizeable browser requests the feature low-precision-viewport can be enabled by setting it to true. Different ranges of viewport dimensions are then grouped to defined breakpoints equalising the ucm and increasing the matching client and server ucms.

Setting low-precision-viewport to false or setting no low-precision-viewport attribute (default) leads to high precision ucm marks and therefore less matching client and server ucms, as the viewport dimensions have to match exactly.

Ignoring viewport heights

Viewport dimensions can also vary because of horizontal scrollbars or other browser chrome elements with variable height (e.g. location bars). To minimize this influence on the UCM, set the ignore-viewport-height attribute to true.

Passing headers from the backend

To make sure that FIT will not increase cacheability where it is not desired, consider enabling or disabling the pass-cache-headers option in your conf/config.xml.