Cache Compatibility Guide
Caching plugins are essential for WordPress performance, but they can sometimes interfere with VeriSelf’s real-time verification flow. This guide explains the known compatibility issues and how to resolve them for popular caching plugins.
Verification shortcode is cached, showing stale results
The shortcode generates a unique liveness token and session per page load. If your page cache serves a stale HTML copy, the token will be expired or mismatched (error E005).
Fix: Exclude pages containing from caching, or exclude them by URL path/pattern. For most caching plugins, this is done via:
- WP Rocket: Settings → Cache → Never Cache URL(s) — add the paths containing your verification shortcode.
- W3 Total Cache: Performance → Cache Groups → Never Cache the Following Pages — add your verification page paths.
- LiteSpeed Cache: Cache → Excludes → Do Not Cache URIs — add your verification page paths.
- WP Super Cache: Settings → Accepted Filenames & Rejected URIs → Add to Rejected URIs.
AJAX requests being cached
VeriSelf uses WordPress AJAX endpoints (admin-ajax.php and admin-post.php) for verification requests. Most caching plugins exclude these by default, but verify:
- WP Rocket: AJAX caching is disabled by default — no action needed.
- W3 Total Cache: Ensure “Don’t cache AJAX requests” is checked in Performance → General Settings.
- LiteSpeed Cache: AJAX support is enabled by default — ensure “ESI” is not forcibly caching admin-ajax.php responses.
Cookie-based page gate not showing on cached pages
If you use VeriSelf’s “On page entry” gate mode with cookies, a cached page may not reflect the user’s verification status until they receive the fresh uncached version.
Fix: Use the shortcode-based gate instead of the cookie-based gate. The shortcode is excluded from cache and runs fresh for every visitor. Alternatively, configure your caching plugin to serve pages dynamically based on the verification cookie (veriself_verified).
Minification breaking the verification UI
Some caching plugins aggressively minify or combine JavaScript, which can break the VeriSelf frontend script.
- Fix: In your caching plugin, exclude the VeriSelf script from minification/combining. Look for settings like “Exclude JavaScript files” and add the pattern
veriselforveriself-frontend. - LiteSpeed Cache: In JS Settings, add
veriselfto JS Excludes. - WP Rocket: Exclude
veriself-frontendfrom Combine JavaScript Files. - Autoptimize: Add
veriselfto “Exclude scripts from Autoptimize”.
Delayed JavaScript execution
Some caching plugins defer or delay JavaScript to improve page speed metrics. If VeriSelf scripts are deferred, the verification UI may not render until after the page has finished loading, or may not render at all.
- Fix: Exclude
veriself-frontendfrom JavaScript defer/delay settings. - WP Rocket: Exclude under “Delay JavaScript execution” → Excluded Scripts → add
veriself. - LiteSpeed Cache: Exclude
veriselfunder JS Defer/Delay settings.
If you continue to experience issues after applying these fixes, enable Debug Mode in VeriSelf → Maintenance → Expert Settings and check the browser console (F12) for JavaScript errors.
