Applies to: WordPress Plugin

Where: WP Admin > Cookie Consent tab > Technical Settings

Overview

Caching plugins improve your site’s performance by serving pre-built HTML pages to visitors. However, caching can interfere with the consent banner’s script injection — visitors may see a cached page that does not include the latest banner configuration or autoblocking modifications.

Cookie Compliance for WordPress keeps its script from being deferred or combined by popular optimizers, and includes a Caching compatibility toggle that clears your caching plugin’s cache when your banner settings change, so cached pages carry your current banner setup.

What the Caching Compatibility Toggle Does

Script exclusions for supported optimizers apply whether or not this toggle is on. For Autoptimize, Breeze, Hummingbird, LiteSpeed Cache, Speed Optimizer and WP Rocket, the plugin always tells the optimizer not to defer, delay or combine the Cookie Compliance script, so the banner is still in place to hold trackers before consent.

When the toggle is on, the plugin also clears your caching plugin’s cache whenever your banner settings change, so visitors are not served pages built with an older banner setup. This covers Breeze, Hummingbird, Speed Optimizer, SpeedyCache, WP Fastest Cache, WP-Optimize, WP Rocket and WP Super Cache. Autoptimize and LiteSpeed Cache get the script exclusions only, so clear their cache yourself after a change.

The toggle is enabled by default for new installations.

Supported Caching Plugins

The following caching plugins have dedicated compatibility modules:

Caching Plugin Supported
Autoptimize Yes
Breeze (Cloudways) Yes
Hummingbird (WPMU DEV) Yes
LiteSpeed Cache Yes
Speed Optimizer (SiteGround) Yes
SpeedyCache Yes
WP Fastest Cache Yes
WP-Optimize Yes
WP Rocket Yes
WP Super Cache Yes

How to Enable Caching Compatibility

  1. Go to WP Admin → Compliance → Cookie Consent tab (classic settings screen: Cookie Consent Settings, where the toggle is called Caching Compatibility).
  2. Scroll to the Technical Settings section.
  3. Toggle Caching compatibility to on.
  4. Click Save WordPress Settings (classic settings screen: Save Changes).

The plugin automatically detects which supported caching plugins are active. No additional configuration is needed.

When to Enable This Setting

Enable Caching compatibility if:

  • You use any of the supported caching plugins listed above.
  • Your hosting provider has a built-in page cache (e.g., SiteGround, Cloudways, WP Engine, Kinsta, Flywheel).
  • You use a CDN that caches full HTML pages (e.g., Cloudflare APO, StackPath).
  • Your consent banner is not appearing on some pages but works on others (symptom of cached vs. uncached pages).

Hosting-Level Page Caches

Some managed WordPress hosts (WP Engine, Kinsta, Flywheel, Pressable) use server-level page caching that operates outside of WordPress plugins. The Caching compatibility toggle addresses WordPress-plugin-level caching. For server-level caches:

  • Purge the host’s page cache after activating or reconfiguring the plugin.
  • If using Cloudflare with full-page caching (APO), purge the Cloudflare cache as well.
  • Ensure the consent banner script is not excluded from cached pages by the host’s caching rules.

After Enabling: Purge Your Cache

After enabling or disabling Caching compatibility (or after making any banner configuration change), always purge your site’s cache so visitors receive fresh pages with the updated banner configuration:

  1. Go to your caching plugin’s settings and click its Purge or Clear Cache button.
  2. If your hosting provider has a separate cache, purge that as well.
  3. Test by opening your site in an incognito/private browser window.

Compatibility with Consent-Aware Plugins

The Caching compatibility toggle covers cached HTML. Some plugins on your site also gate their own behaviour on consent — separately from anything in the cached HTML. Cookie Compliance for WordPress talks to those plugins through the WP Consent API integration (available from v3.1.0).

When the WP Consent API plugin is installed alongside Cookie Compliance, the following plugins read your banner’s consent decisions automatically — no per-plugin snippets, no caching plugin involved:

  • WooCommerce (analytics + marketing pixels)
  • Google Site Kit (GA4, Ads, Tag Manager)
  • Burst Statistics (cookie vs cookieless mode)
  • WP Statistics
  • Pixel Manager for WooCommerce
  • AddToAny
  • AFL UTM Tracker

Toggle the integration on or off at Cookie Consent tab → Technical Settings → WP Consent API. The toggle is on by default. On the classic settings screen it is greyed out when the WP Consent API plugin is not installed; on the current screen it stays clickable but has no effect until that plugin is active. See WP Consent API Integration for the full reference.

For social-feed plugins, see Smash Balloon Compatibility. Smash Balloon Instagram and Twitter feeds are handled by a native bridge inside the banner; Facebook and YouTube feeds need the legacy-cookie bridge snippet.

Troubleshooting

Banner appears inconsistently (some pages yes, some no)

This is the classic symptom of a page cache serving stale HTML. Purge the cache and verify Caching compatibility is enabled. From 3.1.14, the plugin’s preview, Beaver Builder previews and JSON requests are marked as not to be cached, which caches that honour the standard no-cache signals respect. Other page builders are not covered. If your cache may already hold such a page, purge it once.

Banner appears but autoblocking does not work on cached pages

Autoblocking modifies script tags in the HTML output. If a cached page was generated before autoblocking was enabled, it still contains the original unmodified script tags. Purge the cache completely after enabling autoblocking.

Caching compatibility is enabled but not taking effect

The banner is only added to connected sites, and cache clearing for SpeedyCache, WP Fastest Cache, WP-Optimize and WP Super Cache runs only when the plugin status is Active (connected to your Hu-manity.co account). Verify your plugin connection status first.

Using a caching plugin not in the supported list

If your caching plugin is not listed above, the Caching compatibility toggle will not have a dedicated module for it. In most cases the banner will still work because it is injected via standard WordPress hooks. If you experience issues, contact support with your caching plugin name and the symptoms you observe.

Was this article helpful?
YesNo