|
/ Documentation /Integrations/ Compatibility: Caching Plugins & Page Builders

Compatibility: Caching Plugins & Page Builders

SureCookie works alongside page caching plugins, CDNs, optimization plugins and front-end page builders. Most of the setup happens on its own: SureCookie keeps its files out of JavaScript and CSS optimization and clears the common page caches when you save settings.

If the banner went missing or unstyled after you turned on an optimization feature, go to What You Still Check by Hand. If your changes don’t show on the live site, see Clearing Caches When You Save. The automatic cache handling needs SureCookie 1.4.0 or later, and the builder editor behavior needs 1.5.0 or later.

How SureCookie Works With a Page Cache

The banner and blocking both work with cached pages.

  • The banner runs in the browser – Each visitor’s choice is stored in their own browser, and the banner script reads it there. A cached page still asks new visitors and stays out of the way for visitors who have already answered.
  • Blocking is applied before the page is cached – SureCookie holds back trackers and embeds in the HTML your server sends. In a typical setup, the copy your cache stores is already the blocked version, and each visitor’s browser releases only what that visitor allowed.

Important: If you use Geographic Rules, a SureCookie Pro feature, with Show only where required by law selected and a full-page cache, the blocking decision is cached with the page and may not match the visitor who later receives it. See Known Limitations in Why Trackers Still Fire Before Consent.

What SureCookie Handles Automatically

You don’t need exclusion rules for SureCookie in the plugins below. It registers itself with them.

Optimization Plugins

A consent banner has to run as the page loads, before the trackers it holds back. SureCookie adds its banner script, its stylesheet and the WordPress core scripts it depends on to each plugin’s own exclusion lists.

Plugin or ServiceWhat SureCookie’s Files Are Kept Out Of
LiteSpeed CacheJavaScript and CSS minify and combine, JavaScript defer, Unused CSS and Critical CSS
WP RocketJavaScript and CSS minify and combine, JavaScript defer, delay JavaScript execution
PerfmattersDelay JavaScript and defer JavaScript
FlyingPressJavaScript delay and defer
HummingbirdJavaScript delay and combine
SiteGround Speed OptimizerJavaScript and CSS combine and minify
AutoptimizeJavaScript and CSS optimization

SureCookie also marks its own tags with the standard “do not optimize” attributes that several optimizers honor, which is how Cloudflare Rocket Loader skips them. Since 1.5.0, if an HTML optimizer strips empty elements, the banner creates its own container and still appears.

Clearing Caches When You Save

Your banner text, colors and blocking choices are part of the page HTML, so a cached page shows the old version until it is cleared. When you save SureCookie settings, including blocking changes on SureCookie → Tracking Manager → Scripts and Embeds and, in SureCookie Pro, Geographic Rules, SureCookie asks these caching plugins to clear their caches: LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, WP Fastest Cache, SiteGround Speed Optimizer, Breeze, Hummingbird, Cache Enabler, Swift Performance, WP-Optimize, NitroPack and FlyingPress. It also clears Autoptimize’s optimized files.

Three cases still need a manual purge:

  • Cookie, category, service and scan changes – Edits under SureCookie → Tracking Manager → All Cookies (including cookie categories), services you add or remove on Known Services, and the results of a finished scan don’t trigger the automatic clear. Clear your page cache after those.
  • CDN and other host caches – SureCookie doesn’t clear a CDN such as Cloudflare directly, or a host cache that none of the plugins above manages. Purge those after any change.
  • Translations – Translations saved in WPML or Polylang String Translation don’t trigger the automatic clear. See Case 6 in Banner Text in the Wrong Language (WPML, Polylang, and Locales).

What You Still Check by Hand

Automatic exclusions don’t reach every option in every plugin, and an exclusion list you maintain yourself can still catch SureCookie. When that happens, exclude SureCookie from the feature by hand.

  1. Add surecookie to the feature’s exclusion box. That one word matches both the banner script and its stylesheet.
  2. Add /wp-includes/js/dist/ as well if the feature delays, defers or combines JavaScript. The banner depends on the WordPress core scripts stored there, and they have to load before it.
  3. Add .surecookie-*, #surecookie-public-root and #surecookie-preferences-root to the allowlist instead if the feature is Unused CSS or Critical CSS. Those lists match CSS selectors, not files.
  4. Purge your page cache and CDN.
  5. Reload your site in a private window.

For the full diagnosis, see Banner Not Appearing: Troubleshooting. For LiteSpeed’s exact settings, see Excluding the SureCookie Banner from LiteSpeed Cache.

Page Builders

SureCookie works with the block editor and with page builders, including Elementor, Divi, Beaver Builder, Bricks, WPBakery and Spectra. The banner renders as an overlay fixed to the screen, outside your builder’s layout, so it doesn’t shift or break builder sections.

Builder Editors

Front-end builders edit your page on the live site, where the banner and blocking would get in the way of the builder’s tools. So when a logged-in user who can edit posts opens the editing screen of Elementor, Beaver Builder, Divi, Bricks or WPBakery, or opens a post preview from the WordPress editor, SureCookie doesn’t load the banner and pauses blocking for that view.

Everywhere else, the banner and blocking still apply, including when those same users browse the site normally.

If your builder isn’t listed, a developer can add its editing-screen query variable with the surecookie_builder_query_vars filter.

Embeds Added Through a Builder

  • Standard embeds – A YouTube video or Google Map placed with a builder widget that outputs a normal embed is blocked the same way as one pasted into a post.
  • Elementor’s Video widget – This widget builds its player in the browser, so SureCookie holds the widget itself for YouTube, Dailymotion and VideoPress videos and plays the video in place once the visitor accepts. Vimeo in this widget uses a normal embed and is blocked the usual way.
  • Placeholders fill the embed’s space – A placeholder takes the blocked embed’s rendered size, including sizes set by builder or theme CSS, such as a Spectra Google Map block, so your layout doesn’t jump when the embed loads.

SureCookie blocks the services in its catalog as soon as blocking is on, before any scan. After a page with a blocked builder embed has loaded, the embed appears under Detected and Managed Resources on Scripts and Embeds, with its category, and you can change or release it there.

Builder and Theme Files

Only WordPress core files served from your site are always exempt from blocking. A theme or builder file is blocked if a pattern in SureCookie’s service catalog matches its address. If a popup, slider or query loop stops working once blocking is on, find the file on Scripts and Embeds and release it, as described in Allowing a Resource in Resource / Script Blocking (Add Embeds + Fixes). If the file isn’t listed there, see Page Builder Popups and Query Loops Stopped Working to find the pattern responsible.

Troubleshooting

  • The banner disappeared or looks unstyled after you turned on an optimization feature – Follow What You Still Check by Hand above.
  • Setting changes don’t show on the live site – Purge your CDN and any host cache. If you changed cookies, categories or Known Services, or a scan has finished, clear your page cache too.
  • An embed stays blocked after the visitor accepts – A cache serving the pre-consent page is one of the usual causes. See Embeds Blocked After Consent (YouTube, Maps, Vimeo).
  • A builder’s editing screen won’t load or its controls don’t respond – Update to SureCookie 1.5.0 or later. For a builder not listed above, see Builder Editors.

Next Steps

To review what SureCookie holds back before consent, see Block Scripts Until Consent (Resource Blocking). For how the banner affects page speed, see SureCookie & Site Performance / Page Speed.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top