The Browser caching option controls how long CDN content is stored in end users' browsers. Two modes are available: Origin controlled and CDN controlled.
Use Origin controlled when the origin server already manages browser cache duration through response headers. Use CDN controlled to set a fixed browser cache lifetime independently of the origin headers.
When Origin controlled is active, the origin determines browser cache behavior through its response headers. Orange's CDN passes the origin's Cache-Control header to browsers unchanged.
If the origin sends no Cache-Control, browsers may apply heuristic caching when a Last-Modified header is present. If neither header is present, the browser does not cache the response.
When CDN controlled is active, Orange's CDN overrides the origin cache headers and sets the lifetime on the response:
Cache-Control — sets the maximum browser cache time. A 12-hour lifetime returns Cache-Control: max-age=43200.
Expires — calculated from the current time plus the max-age value.
📝
Browser caching applies to responses with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308. Responses with other codes will not be cached.
Configure browser caching
Configure browser caching on a CDN resource:
1
Navigate to CDN resources
In the CDB Technical Web Portal, navigate to CDN > CDN resources and click the CNAME of the required resource.
2
Open browser caching settings
In the Cache section, click Browser caching.
3
Enable the toggle
Turn on the Enable browser caching toggle.
4
Select the caching mode
From the dropdown, select Origin controlled or CDN controlled. If Origin controlled is selected, the configuration is complete — proceed to save. For CDN controlled, configure the cache lifetime using the expandable block.
5
Save
Click Save changes.
Set options.browser_cache_settings on a CDN resource. Origin controlled is selected in the Customer Portal. enabledtrue with value sets the CDN controlled lifetime. Find the resource ID in list CDN resources.
Set how long browsers keep a CDN response with the Terraform provider v2. Origin controlled is selected in the Customer Portal. With enabled set to true, value is the CDN controlled lifetime: the CDN overrides origin cache headers, sends Cache-Control with max-age, and sets Expires to the current time plus that max-age.
The lifetime applies to responses 200, 201, 204, 206, 301, 302, 303, 304, 307, and 308. Other codes are not cached. A duration above 1y returns HTTP 400.
Set a CDN controlled lifetime
Set enabled to true and value to 4d to keep responses in the browser for four days. The CDN sends Cache-Control: max-age=345600.
Edit value and run terraform apply to change the lifetime.