---
title: Temporarily disabling caching
summary: null
url: >-
  https://www.fastly.com/documentation/guides/full-site-delivery/caching/temporarily-disabling-caching
---

Caching can be disabled:

- at the individual URL level,
- at the browser level, and
- at the site level.

## Disabling caching at the individual URL level

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4.   Click **Settings**.

5. Click **Create cache setting** to create a new cache setting.

   ![the Cache Settings window](/img/new-cache-settings-force-pass.png)

6. Fill out the **Create a cache setting** fields as follows:
   - In the **Name** field, enter a descriptive name for the new cache setting (e.g., `Force Pass`).
   - In the **TTL (seconds)** field, enter `0` to set the lifespan of the object in our cache nodes to zero.
   - From the **Action** menu, select **Pass (do not cache)** to pass the request and avoid caching it.
   - In the **Stale TTL (seconds)** field, enter `0` to set the amount of time to serve stale content, in seconds, to zero.

7. Click **Create**.

8. Click the **Attach a condition** link to the right of the newly created cache setting.

   ![the New Condition window](/img/new-condition-cacheable-url-regex.png)

9. Fill out the **Create a new cache condition** fields as follows:
   - In the **Name** field, enter a descriptive name for the condition (e.g., `Cacheable URLs`).
   - In the **Apply if** field, create a condition that matches the URLs to not cache. For example, you could enter `req.url !~ "^/(cacheable|images|assets)"` to set the condition to look for URLs that do not start with `/cacheable`, `/images`, or `/assets`. If the condition finds them, the URLs should be cached. If the condition doesn't find them, the cache setting that is set to `Pass` ensures the URLs are explicitly not cached.

10. Click **Save and apply to**.

11.   From the **Activate** menu, select **Activate on Production** to deploy your configuration changes.

> **HINT:** You can use these steps to [override default caching based on a backend response](https://www.fastly.com/documentation/solutions/examples/overriding-caching-defaults-based-on-a-backend-response).

## 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.

```term nolinenums
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
```

> **WARNING:** If you want your content cached in Fastly but not cached on the browser, you must not add these headers on your origin server. Instead, add these as new Headers on the Content page and be sure the Type is set to [Response](https://www.fastly.com/documentation/guides/full-site-delivery/responses/responses-tutorial).

## Disabling caching at the site level

You can disable caching at the site level by creating a [VCL Snippet](https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/vcl-snippets/using-vcl-snippets) to pass on all requests to your service:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. Click **VCL**.

5. Click **VCL snippets**.

6. Click **Add snippet**.

7. Fill out the **Add VCL snippet** fields as follows:

   - Using the **Type** controls, select **Regular** to create a regular VCL snippet.
   - In the **Name** field, enter an appropriate name (e.g., `Pass All Requests`).
   - Using the **Placement** controls, select **Within subroutine**.
   - From the **Subroutine** menu, select **recv (`vcl_recv`)**.
   - _(Optional)_ In the **Priority** field, enter the order in which you want the snippet to execute. Lower numbers execute first.
   - In the VCL editor, add the following code:

   ```vcl
   return(pass);
   ```

8. Click **Add** to create the snippet.

9.   From the **Activate** menu, select **Activate on Production** to deploy your configuration changes.

All requests will continue to be passed until you remove return(pass); from `vcl_recv` in your VCL or you delete this snippet.
