Short answer: Since version 4.3.1, Easy Form Builder excludes pages that contain a form from page caching by itself. It sends no-store headers and tells WP Rocket, LiteSpeed Cache, WP Fastest Cache, SiteGround Optimizer, WP-Optimize, WP Super Cache, Jetpack Boost and Cloudflare APO to skip those pages. You only exclude pages by hand for server or CDN caches.
Quick facts
- Plan: every plan (Free, Free Plus and Pro)
- Time: 2 minutes to check, about 5 minutes for a manual rule
- Tested with: Easy Form Builder 4.3.1 on WordPress 7.1.4
- Last verified:
Video transcript
Should you exclude WordPress form pages from cache? A cached form page carries an old security token, so submissions can fail with an expired session or a 403 error. Since version 4.3.1, Easy Form Builder keeps form pages out of page caches by itself. Pages with a form send no-store headers; other pages stay cached. It handles WP Rocket, LiteSpeed Cache, Cloudflare APO and more. Add a manual rule only for a server or CDN cache. Easy Form Builder is free on WordPress.org. The full guide is on whitestudio.team.
Why forms must not be served from a page cache
A page cache stores one copy of a page and serves it to every visitor. A form page carries a short-lived security token and a session for the visitor. Served from the cache, that token is hours or days old, so the submission can fail with “Your session has expired. Please refresh the page and try again.” or a 403 error after Submit. Script optimizers that delay or combine JavaScript can also break validation, steps and payments.
What Easy Form Builder 4.3.1 does automatically
Easy Form Builder finds every page whose content holds a form (shortcode, block, Elementor or WPBakery) and, when such a page is viewed:
- sends
Cache-Control: private, no-store, no-cache, must-revalidate, max-age=0and setsDONOTCACHEPAGEandDONOTMINIFY, which most cache plugins respect; - sends
cf-edge-cache: no-cache, which Cloudflare APO follows; - tells LiteSpeed Cache not to cache the page, adds the form pages to WP Rocket’s “Never cache URLs” list and to SiteGround Optimizer’s exclusions, and asks WP Fastest Cache, WP-Optimize, WP Super Cache, Jetpack Boost, Cache Enabler and Autoptimize to skip the page;
- marks its scripts with
data-no-optimizeanddata-no-deferso optimizers keep them in order; - clears the cached copy of a page when you add or remove a form on it.
Pages without a form stay cacheable. A form in a widget, footer or popup also leaves the page cacheable: the form fetches a fresh token from the server when it loads.
How to check that a form page is not cached
Open the form page in a private window, open developer tools (F12), go to Network, reload and click the first request. Or run curl -I https://your-site.com/contact/. On our test site the page with a form returned the no-store headers and the page without a form did not:

If the response shows a cache hit header from your host or CDN (for example x-cache: HIT or cf-cache-status: HIT), a cache outside WordPress is ignoring these headers; add a manual rule below.
When you still need a manual exclusion
- Server caches that do not read WordPress headers, such as some Varnish or NGINX FastCGI setups at managed hosts.
- A Cloudflare Cache Everything rule, or any CDN rule that caches HTML regardless of headers.
- A cache plugin where an administrator forced caching for the page, or an older Easy Form Builder version.
Exclude the page path, for example /contact/ or /order-form/, then clear every cache layer (plugin, server, CDN, browser) and test the form in a private window.
Where each cache plugin keeps its exclusion setting
| Cache | What 4.3.1 does | Manual setting (if you need it) |
|---|---|---|
| LiteSpeed Cache | Marks form pages as not cacheable | LiteSpeed Cache » Cache » Excludes, Do Not Cache URIs |
| WP Rocket | Adds form pages to “Never cache URLs” | WP Rocket » Advanced Rules » Never Cache URL(s) |
| W3 Total Cache | Respects DONOTCACHEPAGE; minify is skipped | Performance » Page Cache » Never cache the following pages |
| WP Fastest Cache | Excludes the current form page | WP Fastest Cache » Exclude |
| NitroPack | Sends the no-store headers | NitroPack » Excluded URLs |
| Cloudflare | Sends cf-edge-cache: no-cache (APO) | A cache rule that bypasses cache for the form path |
Troubleshooting
- “Your session has expired. Please refresh the page and try again.” The page was served from a cache with an old token. Check the headers and add a manual rule for the cache that ignored them.
- The form works when logged in but not for visitors. Most caches skip logged-in users, so only visitors get the cached copy.
- A 403 after Submit. Usually a firewall, not the cache; see how to fix a 403 error when submitting a form.
Frequently asked questions
Do I still need to exclude form pages from WP Rocket or LiteSpeed Cache?
Not on Easy Form Builder 4.3.1 or later; it handles those plugins itself. Check the response headers once to be sure.
Will this slow down my site?
Only pages that contain a form are excluded. Every other page stays cached.
Can a developer change which pages are excluded?
Yes. The filter emsfb_cache_bypass receives the default decision, the context and the post or form ID; return true to keep a page out of caches or false to leave it cacheable.
What about a form in a popup or footer?
The page stays cacheable, and the form fetches a fresh security token when it loads.
What’s next
- Fix a 403 error when submitting a form
- Security plugin settings for Easy Form Builder
- Stop form spam without CAPTCHA
- Create a multi-step form in WordPress
Updated for Easy Form Builder 4.3.1 on . Rewritten for the automatic cache exclusion in 4.3.1, checked against the plugin code and a header test.
