Not released yet. This page describes the plugin at release.

Join the waitlist

Caching & CDN compatibility

Why tests keep working behind full-page caching.

Short answer

Tests keep working behind full-page caching and CDNs because the variant is assigned in the visitor's browser, so the same cached HTML serves everyone. Anti-flicker rules are inlined with a two-second failsafe, the roughly 14 KB visitor script loads from the page head on every page by default, and the popular caches are purged when a test starts or stops.

1. Why caching does not break tests

Most testing tools break behind caching because they decide the variant on the server; the cache then freezes one variant for everyone. ImproveAB assigns variants in the visitor's browser instead, so the same cached HTML works for every visitor and no cache exclusions are needed.

2. Anti-flicker and the script

The anti-flicker rules are inlined: variant markup stays hidden until the runtime reveals the assigned version, with a failsafe that shows the original after two seconds if the script is blocked, never every version at once. The visitor script is about 14 KB gzipped and loads from the page head, with the defer attribute on WordPress 6.3 and later. By default it loads on every page, so a conversion handed back from a cross-domain split test is never missed; a filter (abtestwp_load_runtime_always) limits it to pages that actually run a test. With JavaScript off, the original is shown and nothing is recorded.

3. Cache purges on start and stop

Because the small head snippet changes when a test starts or stops, the plugin purges the popular caches at those moments: WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, WP Fastest Cache, Cache Enabler, Hummingbird, Breeze, SiteGround Optimizer, Nginx Helper, WP Engine, Kinsta, Pantheon and the Cloudflare plugin. It also sends Autoptimize's cache-purged notice for hosts that listen for it, and offers a hook for anything else. Script optimisers are a separate matter: the plugin adds its own scripts to the exclusion lists of WP Rocket, LiteSpeed Cache, Perfmatters, Autoptimize and SiteGround Optimizer automatically, but a delay-JavaScript tool that only has a settings screen (Flying Scripts, WP Fastest Cache's delay, Asset CleanUp) needs runtime.js, abtestwp-pending and abtestwp-redirect excluded by hand. If your CDN or proxy rewrites HTML aggressively, test one page first.

Want the longer read? See the full testing guide on the blog, or browse all docs.

Common questions

Which caching plugins are purged automatically?

WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, WP Fastest Cache, Cache Enabler, Hummingbird, Breeze, SiteGround Optimizer, Nginx Helper, WP Engine, Kinsta, Pantheon and the Cloudflare plugin. It also sends Autoptimize's cache-purged notice for hosts that listen for it, and offers a hook for anything else.

What happens if JavaScript is blocked?

The original is shown and nothing is recorded. If the script loads slowly, a failsafe shows the original after two seconds, and the assigned version takes over once the script runs.

Do I need to exclude tested pages from the cache?

No. Assignment happens in the browser, so no cache exclusions are needed.

Ready to test it yourself?

Free, cookieless, no traffic limits, on any builder or theme.

Read the FAQ