Configuring CleanTalk with Caching Plugins

 

Caching plugins (such as WP Rocket, LiteSpeed Cache, or FlyingPress) are essential for speed, but they can sometimes "freeze" dynamic scripts. This leads to outdated anti-spam tokens, causing false positives.

Follow this guide to ensure CleanTalk and your cache work correctly.

Go to the Anti-Spam plugin settings: 

WordPress Admin Dashboard → Settings → Anti-Spam by CleanTalk.

  1. Set the Set Cookies option to Auto. The "Auto" mode (default setting) uses the "Off" mode and switches to the "Alternative mechanism" in case of server cache detection (e.g., Varnish, Siteground).
  2. Enable the Use CleanTalk JavaScript library option. This option includes external Anti-Spam by the CleanTalk JavaScript library to get visitors' info data

After applying these settings, always purge all caches

 

Script Exclusions

We recommend adding the following script to your caching or optimization plugin’s exclusion list (JavaScript Exclusions). Optimization plugins often minify, combine, or defer JavaScript, which can inadvertently "break" CleanTalk’s logic.

  • apbct-public-bundle.min.js
  • apbct-public-bundle_ext-protection.min.js
  • apbct-public-bundle_ext-protection_gathering.min.js
  • apbct-public-bundle_full-protection.min.js
  • apbct-public-bundle_full-protection_gathering.min.js
  • apbct-public-bundle_gathering.min.js
  • apbct-public-bundle_int-protection.min.js
  • apbct-public-bundle_int-protection_gathering.min.js

As an additional measure, we recommend setting your cache lifetime to 24 hours or less. Keeping the cache under 24 hours ensures that validation scripts are refreshed regularly.

 

Specific Guides for Popular Cache Solutions


If you use one of the following plugins, please refer to our dedicated deep-dive guides:

 

Was this information helpful?

It would also be interesting

Copied to clipboard