> 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

Configure browser-side caching behavior for specific files, paths, directories, and file extensions.

**Browser Cache Rule** controls how long content can be cached in end-user browsers through HTTP response cache headers. Rules can preserve origin caching directives, disable browser caching, or apply a configured cache duration.

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

{% hint style="info" %}
Browser Cache Rules control browser-side caching and do not modify CDN edge cache expiration. To configure edge caching, see Edge Cache Expiration.
{% endhint %}

## Cache Modes

Each Browser Cache Rule supports one of the following cache modes:

<table><thead><tr><th width="133.5">Cache Mode</th><th>Behavior</th></tr></thead><tbody><tr><td><strong>Origin</strong></td><td>Preserves the caching headers provided by the origin server.</td></tr><tr><td><strong>No Cache</strong></td><td>Configures the response to prevent browsers from reusing cached content without a fresh request or validation, according to the applied cache directives.</td></tr><tr><td><strong>Cache</strong></td><td>Overrides origin caching directives and applies the configured browser cache duration.</td></tr></tbody></table>

## Configuration Steps

{% stepper %}
{% step %}

### Open Browser Cache Rule

Open your CDN Resource in the Medianova Control Panel and select **Caching**.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2F1SD0yAnN0bVzRPnyIvme%2Fimage.png?alt=media&#x26;token=bbf42df8-892a-4dd9-a2c5-a14ee17da9a9" alt="Browser Cache Rule configuration in the Medianova Control Panel"><figcaption><p>Browser Cache Rule configuration.</p></figcaption></figure>

Under **Browser Cache Rule**, select **Add rule**.
{% endstep %}

{% step %}

### Select the Rule Type

Select the matching criteria for the rule:

* **All Files** – Applies the rule to all files.
* **Full Path** – Matches a specified full path.
* **Directory** – Matches files under a specified directory.
* **File Extension** – Matches files with specified extensions.

Complete any additional matching fields displayed for the selected rule type.
{% endstep %}

{% step %}

### Set the Priority

Enter the **Priority** value.

Rules with lower numeric priority values take precedence. If multiple rules match the same request, the matching rule with the lowest priority value is applied.
{% endstep %}

{% step %}

### Select the Cache Mode

Select the browser caching behavior:

* **Origin** – Preserve caching headers from the origin.
* **No Cache** – Apply the no-cache behavior configured by the CDN.
* **Cache** – Override origin caching directives and specify a browser cache duration.

Complete any additional fields displayed for the selected mode, including **Cache Time** when applicable.
{% endstep %}

{% step %}

### Add the Rule

Select **Add rule** to add the configured rule to the list.
{% endstep %}

{% step %}

### Configure HTML/JSON Behavior

Use **Apply the HTML/JSON files** to determine whether Browser Cache Rules also apply to HTML and JSON content.
{% endstep %}

{% step %}

### Save the Configuration

Select **Save** in the pending changes bar.

Review the pending changes and confirm the update to apply the configuration to the CDN Resource.
{% endstep %}
{% endstepper %}

## Rule Evaluation

Browser Cache Rules are evaluated according to their matching criteria and configured priority.

The rule list displays the following fields:

<table><thead><tr><th width="204">Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Type</strong></td><td>Matching method used by the rule.</td></tr><tr><td><strong>Content</strong></td><td>Path, directory, extension, or content scope associated with the rule.</td></tr><tr><td><strong>Priority</strong></td><td>Rule precedence when multiple rules match a request.</td></tr><tr><td><strong>Cache Mode</strong></td><td>Browser caching behavior applied by the rule.</td></tr><tr><td><strong>Cache Time</strong></td><td>Configured browser cache duration, when applicable.</td></tr><tr><td><strong>Directive</strong></td><td>Cache directive associated with the rule.</td></tr><tr><td><strong>Exact Match</strong></td><td>Indicates whether exact matching is configured for the rule.</td></tr></tbody></table>

When multiple rules match a request, the rule with the lowest numeric priority value takes precedence.

## Important Notes

* Use longer browser cache durations for static assets that change infrequently and shorter durations for frequently updated content.
* Browser Cache Rules affect client-side caching independently of CDN edge cache expiration.
* Purging content from CDN edge servers does not invalidate copies already stored in end-user browsers.
* Browser cache behavior also depends on the response cache directives and the browser's implementation.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
