> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/caching/browser-cache-rule.md).

# Browser Cache Rule

Browser Cache Rule allows you to control how long different resource types remain cached in the visitor’s browser.

This improves performance by reducing repeated network requests for static or frequently accessed files.

You can manage Browser Cache Rules in the [Medianova Control Panel](https://cloud.medianova.com) or via [API](https://clients.medianova.com/api-documentation/performance-cdn/caching#put-api-v1-cdn-organization_uuid-resource-resource_uuid-1).

## **Configure Browser Cache Rules**

Log in to the Medianova Control Panel, select a CDN resource in the CDN section, and navigate to the Caching tab.

<figure><img src="/files/VUzOwWsai4klBKzkUOLe" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}
**Add a Browser Cache Rule**

A dialog opens for creating a new Browser Cache Rule.

<figure><img src="/files/WZ5W5GQ60dUusl1Fcu9f" alt=""><figcaption><p>The 'Add Browser Cache Rule' dialog box appears after clicking Add.</p></figcaption></figure>
{% endstep %}

{% step %}
**Select the Type for the rule.**

Choose how the rule matches content:

* **All Files** — Applies rule to all content.
* **Full Path** — Applies to an exact URL path.
* **Directory** — Applies to all content under a directory (for example: `/images/`).
* **File Extension** — Applies to file types (for example: `.jpg`, `.css`, `.js`).
  {% endstep %}

{% step %}
**Set the Priority**

Select **Priority** to determine the rule evaluation order.
{% endstep %}

{% step %}
**Select the Cache Mode.**

* **Origin** — Uses caching headers from the origin.
* **No Cache** — Disables browser caching.
* **Cache** — Forces caching for a defined duration.
  {% endstep %}

{% step %}
**Select Add to create the rule.**
{% endstep %}

{% step %}
**Configure HTML/JSON Application**

Enable or disable **Apply the HTML/JSON files** to define whether rules also apply to `.html` and `.json` responses.
{% endstep %}

{% step %}
**Select Submit to apply**
{% endstep %}
{% endstepper %}

### Edit a Browser Cache Rule

{% stepper %}
{% step %}
Open the options menu for the rule and select **Edit**.
{% endstep %}

{% step %}
Modify **Type**, **Priority**, or **Cache Mode** as required.
{% endstep %}

{% step %}
Select **Submit** to save the changes.
{% endstep %}
{% endstepper %}

### Delete a Browser Cache Rule

{% stepper %}
{% step %}
Open the options menu for the rule and select **Delete**.
{% endstep %}

{% step %}
Confirm the deletion to remove the rule.
{% endstep %}

{% step %}
Select **Submit** to apply the update.
{% endstep %}
{% endstepper %}

* Rules are evaluated in order of **Priority**, where smaller numbers indicate higher precedence.
* Browser Cache Rules control **browser-side caching only**, not CDN edge caching.
* The **Apply the HTML/JSON files** toggle affects all rules globally.
* When **Cache Mode = Origin**, browser caching behavior follows origin headers; **No Cache** forces revalidation; **Cache** overrides browser behavior with a fixed duration.

### Best Practices

* Use **file extension** rules to cache static assets like `.js`, `.css`, and `.png` for long durations.
* Use **no cache** mode for frequently updated resources (e.g., `.html`, `.json` APIs).
* Assign **high priority** to specific full path or directory rules if they should override global rules.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/caching/browser-cache-rule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
