Caching and CDNs
Caching makes sites fast, but it can freeze parts of a page that need to stay dynamic. Here is how to keep AcquisitionSuite working alongside page caches, minifiers and CDNs.
What can go wrong
- A cached page carries an old security token, so submissions are rejected.
- Combined or delayed JavaScript stops the popup from opening. See Popup not opening.
- A stale page keeps showing an old form after you edit it.
Recommended steps
- After changing forms, files or settings, purge the page cache and CDN.
- Exclude AcquisitionSuite’s scripts from minify-combine and from “delay JavaScript”.
- Keep the token lifetime of your page cache reasonable (a day or less), so cached pages do not outlive their nonces.
- Do not cache admin pages or AJAX requests to
admin-ajax.php.
Downloads and CDNs
Download links are dynamic and single-use. Do not cache the download address or route it through a CDN rule that caches by URL, or the second visitor could be served the first visitor’s file or an expired-link message.
Payment and webhook URLs
Never cache the webhook address (/?acquis_pay_webhook=1&gateway=...). Add it to your caching plugin’s “never cache URLs / query strings” list, and allow the gateways through any firewall.
Logged-in vs logged-out
Most cache plugins do not cache pages for logged-in users, so a form can work for you but fail for visitors. Always test in a private window.
Cloudflare and similar services
- Disable Rocket Loader (or equivalent script rewriting) for AcquisitionSuite’s scripts.
- Bypass cache for the webhook address and admin AJAX.
- Whitelist your payment gateways if a firewall rule challenges their requests.
Related: Form not showing, Spam protection.