Chúc mừng Tết Trung Thu 15% off everything Shop the sale
Browse topics
Intermediate All add-ons

Changes not showing? Browser cache, Cloudflare and page caching

You changed a setting or upgraded an add-on, but the forum looks the same. Usually something is serving an old copy. Where to look.

Updated 4 min read By the D.C Style team

On this page

You saved a setting, upgraded an add-on or changed your style, but the forum looks exactly the same. Usually the change worked and something between your forum and your screen is showing you an older copy. That can be your browser, a CDN such as Cloudflare, or a page cache on the server. This guide covers where old copies come from and how to clear each one.

First, test without any cache

Before you change anything, check whether the problem is a cache at all:

  1. Open the page in a private or incognito window and log in there.
  2. If you are testing a change for guests, also look at the page logged out in that private window.
  3. If the change appears in the private window, the forum is fine and your normal browser has an old copy. A hard refresh fixes it: Ctrl + F5 on Windows, Cmd + Shift + R on a Mac.

XenForo helps here on its own. It adds a version code to the addresses of its CSS and JavaScript files, and changes that code when you edit a style or install and upgrade add-ons. Browsers therefore normally fetch the new files by themselves. If a private window still shows the old version, read on.

Cloudflare and other CDNs

A CDN keeps copies of your files on servers around the world. That is great for speed, but it can keep serving an old copy after you change something.

  • Purge the cache. In your Cloudflare dashboard, open the caching settings and purge everything. Other CDNs have a similar button.
  • Do not cache forum pages. A rule that caches all HTML, such as "Cache Everything", makes visitors see pages that are minutes or hours old. It can even show one member's page to another. Let Cloudflare cache files such as images, CSS and JavaScript, not the pages themselves.
  • Turn off Rocket Loader. Cloudflare's Rocket Loader changes how JavaScript loads, and it regularly breaks XenForo's buttons, pop-ups and editors. Turn it off for your forum. Buttons or pop-ups not working explains how to spot this.

Tip: Some Cloudflare setups also change how visitors appear to XenForo, for example which IP address they seem to come from. If your forum uses Cloudflare and something about online status or IP addresses looks wrong, mention Cloudflare when you open a ticket.

XenForo's page cache for guests

XenForo has an optional full page cache, switched on in src/config.php with $config['pageCache']. It is off by default. When it is on, guests are served saved copies of pages for a few minutes: 300 seconds unless your config sets another lifetime. Logged-in members always get fresh pages.

If a change shows for you but not for guests, this is a likely cause. Wait for the lifetime to pass, and always test guest-facing changes logged out after that wait.

Some hosts also add their own page cache in front of your site. Your hosting control panel may call it LiteSpeed Cache, Varnish or simply "page cache". If you cannot find one, ask your host whether your forum's pages are cached and how to clear it.

New PHP files not taking effect

PHP keeps compiled copies of code in memory, called OPcache, to run faster. Most servers notice new files automatically, but some are set up not to check. If you uploaded a new add-on version and the old behaviour continues, even in a private window, ask your host to reset OPcache or restart PHP.

Note: Uploading the files is only half of an upgrade. The add-on's templates, phrases and database changes are imported when you click Upgrade in Add-ons. How to upgrade an add-on.

When it is not a cache

If a private window shows no change either, a cache is not the problem. Check the usual suspects instead: permissions, the add-on's options, widget positions and template modifications. Installed an add-on but nothing shows up? goes through each. For style changes that do not appear, check you edited the style your members actually use. See Change colours and sizes with style properties.

Still stuck? Open a support ticket and tell us whether you use Cloudflare or another CDN, what you changed, and what you see in a private window.

Did this guide help? Thanks! Glad it worked. Sorry about that. What went wrong? Thanks for telling us. We'll use it to improve this guide.

What went wrong?
Need a reply? Open a ticket instead.

Still stuck? Open a ticket