Title: CF7 5.4 errors when using cache plugin
Last modified: March 29, 2021

---

# CF7 5.4 errors when using cache plugin

 *  [pca2014](https://wordpress.org/support/users/pca2014/)
 * (@pca2014)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/)
 * **Caching CF7 JavaScript can break the functionality of the form, animations 
   and other things site wide.**
 * I’m using theme Enfold v5.8 and CF7 5.4 and WP-Rocket v3.8.5 for caching. – all
   the latest versions.
 * In WP-Rocket under FILE OPTIMIZATIONS I had to disable the following options:
 * 1. Combine JavaScript files
    2. Load JavaScript deferred
 * I assume similar settings in other caching programs will resolve the issue.
 * **I can exclude CF7 files from being combined or deferred but I don’t know which
   files those are. Could you tell me what CF7 JavaSCript files to exclude?**
    -  This topic was modified 5 years, 2 months ago by [pca2014](https://wordpress.org/support/users/pca2014/).

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [irynagoji](https://wordpress.org/support/users/irynagoji/)
 * (@irynagoji)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14132212)
 * Have the same issue with custom theme.
    Reverted Contact Form for older version
   and now it works fine for us.
 * I try to “Excluded JavaScript Files” for contact form – but it doesn’t help me.
 *  [tzuml](https://wordpress.org/support/users/tzuml/)
 * (@tzuml)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14132433)
 * I had the same issue. Using WP-Rocket and Oshin Theme. Downgraded to WPCF7 version
   5.3 and now the forms are working again.
 *  [amityweb](https://wordpress.org/support/users/amityweb/)
 * (@amityweb)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14132830)
 * This is a common issue, many posts about it, cant see a statement from the team
   yet.
 * I tried excluding the files from minification/concatenation in WP Rocket and 
   it didn’t work. I looked at the un-optimised site when logged in as admin, found
   all the CF7 JS files and inline script, added those to be excluded, and still
   did not work. Either I missed some files, or it wont work anyway.
 * Eitherway, its not best practice to exclude optimising files, so CF7 team need
   to fix this.
 * In the meantime the only solution I found is rollback to 5.3.2. Unoptimised was
   not a solution for us.
    -  This reply was modified 5 years, 2 months ago by [amityweb](https://wordpress.org/support/users/amityweb/).
 *  Thread Starter [pca2014](https://wordpress.org/support/users/pca2014/)
 * (@pca2014)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14133208)
 * I didn’t exclude anything. I simply disabled these options and everything works.**
   I did NOT disable minification.** The one thing you didn’t mention is “Load JavaScript
   deferred”. Did you also try disabling that?
 * In WP-Rocket under FILE OPTIMIZATIONS I had to disable the following options:
 * 1. “Combine JavaScript files”
    2. “Load JavaScript deferred”
 * I’m not saying this is a solution, just a workaround until it’s fixed.
    -  This reply was modified 5 years, 2 months ago by [pca2014](https://wordpress.org/support/users/pca2014/).
 *  [billbordallo](https://wordpress.org/support/users/billbordallo/)
 * (@billbordallo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14133881)
 * Hi,
    I am having similar issues with W3-Total-Cache and CloudFlare (with Automatic
   Platform Optimization for WordPress enabled).
 * In my case, the forms stop to sending emails and the temporary solution is to
   clean all caches (page cache in W3TC and purge cache in CloudFlare). Then, the
   forms work again.
 * However, after a few hours the forms stop again. I am assuming the js scripts
   cannot be cached in version 5.4.
 * After downgrade to version 5.3.2, the forms are working again.
 * Any advice to prevent this issue would be very appreciated.
 *  Thread Starter [pca2014](https://wordpress.org/support/users/pca2014/)
 * (@pca2014)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14136710)
 * [@billbordallo](https://wordpress.org/support/users/billbordallo/)
 * > However, after a few hours the forms stop again. I am assuming the js scripts
   > cannot be cached in version 5.4.
 * I don’t think that’s the problem. It may have something to do with the use of“
   nonces”, which the CF7 author mentioned on their support forums. The problem 
   with using “nonces” to enhance security is that the page will have to be re-chached
   every 12hours or so; I read that in my WP-Rocket documentation. Obviously that
   will heavily degrade the value of caching and the CF APO, which I am also using.
 * FYI: Mine also broke after 12-hours because this, so I’m rolling back now. It’s
   not worth the performance burn.
 * [https://codex.wordpress.org/WordPress_Nonces](https://codex.wordpress.org/WordPress_Nonces)
    -  This reply was modified 5 years, 2 months ago by [pca2014](https://wordpress.org/support/users/pca2014/).
 *  Thread Starter [pca2014](https://wordpress.org/support/users/pca2014/)
 * (@pca2014)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14136962)
 * [@takayukister](https://wordpress.org/support/users/takayukister/)
 * 1. CF7 5.4 is incompatible with caching, specifically combining and deferring
   JavaScript files, which will cause a performance hit.
 * 2. The use of “nonces” means a website has to be re-caches every 12 or 24-hours,
   I think? This will obviously cause a performance hit when using CloudFlare since
   all of the files have to be re-cache and with something like CloudFlare ARGO 
   where the cache is distributed almost all of the benefit will be lost.
 * The bottomline is that this is a hassle and bad for performance.
 * Please make “nonces” optional and find a way to make CF7 compatible with caching.
 * I have already rolled back to the previous version.
 * Thanks!
 *  [billbordallo](https://wordpress.org/support/users/billbordallo/)
 * (@billbordallo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14145932)
 * [@pca2014](https://wordpress.org/support/users/pca2014/)
 * > I don’t think that’s the problem. It may have something to do with the use 
   > of “nonces”, which the CF7 author mentioned on their support forums. The problem
   > with using “nonces” to enhance security is that the page will have to be re-
   > chached every 12hours or so; I read that in my WP-Rocket documentation. Obviously
   > that will heavily degrade the value of caching and the CF APO, which I am also
   > using.
   > FYI: Mine also broke after 12-hours because this, so I’m rolling back now. 
   > It’s not worth the performance burn.
 * Thanks for the information. I hope that the CF7 plugin developer fixes this issue
   soon.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘CF7 5.4 errors when using cache plugin’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [animations](https://wordpress.org/support/topic-tag/animations/)
 * [caching](https://wordpress.org/support/topic-tag/caching/)
 * [form](https://wordpress.org/support/topic-tag/form/)

 * 8 replies
 * 5 participants
 * Last reply from: [billbordallo](https://wordpress.org/support/users/billbordallo/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/cf7-errors-when-using-cache-plugin/#post-14145932)
 * Status: not resolved