• Resolved aggk

    (@aggk)


    Hi,

    Is it recommended to exclude pages that holds Ninja Forms, from cache plugins?

    I´m using Super Cache at the moment.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    Good morning. I hope you’re doing great.

    If you’re using a caching plugin (e.g., WP Super Cache), you need to exclude Ninja Forms’ JavaScript files. Of course, caching in general is fine, but we do not recommend minimizing, combining, deferring, or caching our JavaScript files as this can cause unintended consequences, just like it would do in many other plugins. Can you please add our files to the list that is excluded from that?

    If you’re unable to do this, you can get in touch with WP Super Cache Support (https://wordpress.org/support/plugin/wp-super-cache/) so they can help exclude Ninja Forms JavaScript files from the caching plugin.

    WP Super Cache
    +++++++++++++
    Go to the Settings > WP Super Cache > Advanced page and scroll down to Rejected URL Strings
    Add this:

    /ninja-forms/

    Save the Settings and clear all cache.

    Once you have excluded the mentioned files, the error should be resolved. If you still encounter the issue, please clear the cache from the caching plugin, your web browser (https://kinsta.com/knowledgebase/how-to-clear-browser-cache/), and also check your website from an incognito/private window in your browser.

    Please keep me posted about the outcome.
     
    Thanks
    Faisal

    Thread Starter aggk

    (@aggk)

    Thank you Faisal,

    I have not yet encountered an error I was just asking for best practice. Would it not enough to simply exclude the page that holds the form for instance /contact/ ?

    Thanks!

    Hi again,

    Excluding the entire page (like /contact/) from caching would work, but it means none of the page’s content gets cached, which can slow down your site for visitors. Also, any other assets on that page won’t be cached either, which isn’t ideal.

    A better approach is to exclude only the Ninja Forms’ JavaScript files and related assets from caching. This way, the caching plugin still caches the page and other assets, keeping your site fast. At the same time, it prevents conflicts caused by caching Ninja Forms scripts, no matter where you use the forms on your site.

    So, excluding Ninja Forms assets specifically is a more precise and efficient way to avoid issues without losing the benefits of caching.

    Hope this helps! Let me know if you have any more questions.

    Regards
    Faisal

    Thread Starter aggk

    (@aggk)

    Hi again,

    Is it enough to exclude /ninja-forms/ when I´m also using conditional add-on?

    Thanks!

    Hi @aggk

    Yes, that’s correct. Excluding the /ninja-forms/ string should work fine for all add-ons. Please don’t hesitate to let us know if you encounter any issues using our plugin in the future.

    Have a good day!

    Regards
    Faisal

    Thread Starter aggk

    (@aggk)

    Thank you for your quick reply!

    I see this in the sourcecode now: /wp-content/plugins/ninja-forms-conditionals/
    …so I should not exclude that?

    Thanks!

    Hi @aggk

    You don’t need to exclude the /ninja-forms-conditionals/ string unless you are experiencing caching issues.

    Please enjoy using the Ninja Forms plugin, and if you encounter any problems, you know how to reach us!

    Regards
    Faisal

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

The topic ‘Ninja Forms with cache plugin?’ is closed to new replies.