LOG IN SIGN UP
Documentation

Temporarily disabling caching

Caching can be disabled:

Disabling caching at the individual URL level

To disable caching at the individual URL level:

  1. Create a request setting that always forces a pass.
  2. Add a condition to the request setting that looks for specific URLs.
  3. Activate the new version of your service to enable the setting.

Disabling caching at the browser level

Theoretically, all browsers should follow the stated rules of the HTTP standard. In practice, however, some browsers don't strictly follow these rules. The following combination of headers seems to force absolutely no caching with every browser we've tested.

Cache-Control: no-cache, no-store, private, must-revalidate, max-age=0, max-stale=0, post-check=0, pre-check=0
Pragma: no-cache
Expires: 0

In addition, IE8 has some odd behavior to do with the back button. Adding Vary: * to the headers seems to fix the problem.

Disabling caching at the site level

You can disable caching at the site level via the Fastly UI or via custom VCL. Via the UI, create a request setting that always forces a pass and then activate the new version of your service to enable the setting. To disable caching at the site level via custom VCL, add this to your Fastly VCL:

sub vcl_recv {
  return(pass);
}

Back to Top