Caching and optimisation plugins
On this page
AjaxPress works with page caching plugins out of the box: WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, WP Fastest Cache, SiteGround Optimizer, FlyingPress and your host’s cache. There’s nothing to exclude from page caching.
JavaScript optimisation is different. If a plugin delays or defers scripts, add AjaxPress to its exclusions.
Page caching: nothing to do
AjaxPress loads ordinary, complete pages, so cached pages work as they always did. After you change AjaxPress settings, clear your page cache so visitors get the new settings straight away.
Delay and defer JavaScript: exclude AjaxPress
“Delay JavaScript execution” and similar features hold scripts back until the visitor first moves the mouse, scrolls or taps. AjaxPress needs to be ready before the first click, so:
- until AjaxPress’s script runs, links load the normal way;
- when it finally runs, it sets itself up by loading the current page into its frame, which can look like the page reloading under the visitor.
Add this to the plugin’s list of scripts not to delay or defer:
ajaxpress
That one keyword covers AjaxPress (ajaxpress.min.js), AjaxPress Pro (ajaxpress-pro.min.js) and AjaxPress’s settings object.
| Plugin | Where the exclusion goes |
|---|---|
| WP Rocket | File Optimization → Delay JavaScript execution → Excluded JavaScript Files |
| LiteSpeed Cache | Page Optimization → Tuning → JS Deferred / Delayed Excludes |
| Perfmatters | Assets → JavaScript → Delay JavaScript → Excluded from Delay |
| FlyingPress | JavaScript → Delay JavaScript → Exclude keywords |
| Autoptimize | JS, CSS & HTML → Exclude scripts from Autoptimize |
| SiteGround Optimizer | Frontend → JavaScript → Exclude from Deferral |
Menu names change between versions. If yours differ, look for an exclusion list next to the delay or defer option.
Combine and minify
Combining AjaxPress’s script with others is usually fine. If AjaxPress Pro’s features stop working after turning on “combine JavaScript”, exclude ajaxpress from combining too: AjaxPress Pro’s script must load in the page <head>, before AjaxPress’s own.
Remove unused CSS
Features such as WP Rocket’s Remove Unused CSS and LiteSpeed’s UCSS keep only the CSS a page uses when it’s scanned. AjaxPress’s loader appears only while a page loads, so its styles can look unused. If the progress bar or spinner loses its look, add ajaxpress to the feature’s safelist.
Cloudflare
- Rocket Loader delays scripts in the same way as “Delay JavaScript”. If AjaxPress behaves oddly with Rocket Loader on, turn Rocket Loader off (Speed → Optimization → Content Optimization).
- Page caching at Cloudflare (Cache Rules, APO, or AjaxPress’s own Super Cache) works as usual.
Still not right?
Turn optimisation features off one at a time, clearing the cache after each, until the problem goes away. Then add the exclusion for that feature. Tell us which feature it was, so we can add it to this page: Report a problem.