Force browsers to update cached version?

Hi all,

We use cloudflare for our web-based apps - we use page rules to cache everything:

Cache Level: Cache Everything, Edge Cache TTL: a month

Sometimes - we need to purge a single file to make updates.

So - for say we purge: “inc.js” - mostly, this works. But some users browser do not collect the new update from cloudflare. They keep the old version. The browser is either caching the JavaScript file itself, or our site is caching the file somehow in configuration.

Can you give any advice on how to FORCE users browsers to check cloudflare and pull the latest cache versions?

Any advice on this would be great.

Many thanks.

You can’t. You will have to send the right caching headers beforehand, so that browsers do not cache the file for too long.

The first question you should find out is if it is cached on Cloudflare’s or the client’s side.

If the file being cached by the browser, or by DNS / ISP - would the headers show something other then cloudflare as the server, or not HIT for status?

If something was identifiable in the header that the user wasn’t using a version from cloudflare - that would be very helpful, as we could then find a way to get the users browser to update the file at their end (appending a parameter to the file, or loading it via jquery with “no cache”)

Thanks for the help.

If the file is cached by the browser it will most likely show the headers it received when it received the file. That will be browser specific.

As I said, you first need to check where it is cached.

This topic was automatically closed after 14 days. New replies are no longer allowed.