Title: Nearly perfect, but jQuery dependent :(
Last modified: August 28, 2020

---

# Nearly perfect, but jQuery dependent :(

 *  [Kai Spriestersbach](https://wordpress.org/support/users/seokai/)
 * (@seokai)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/awefully-programmed/)
 * I really like the plugin and use the pro version on one site,
    but it needs jQuery
   which makes page loadtime slow.
    -  This topic was modified 5 years, 7 months ago by [Kai Spriestersbach](https://wordpress.org/support/users/seokai/).

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

 *  Plugin Support [Ethan Choi](https://wordpress.org/support/users/ethanchoi/)
 * (@ethanchoi)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/awefully-programmed/#post-13327364)
 * Hey [@seokai](https://wordpress.org/support/users/seokai/),
 * Sorry to hear that you’re running into issues!
 * However, WPForms loads its assets conditionally on pages where a form is displayed.
 * In order for us to troubleshoot the issue, could you create a post in our WPForms
   Lite support forum, and share the URL of your site there?
 * Thanks!
 *  Thread Starter [Kai Spriestersbach](https://wordpress.org/support/users/seokai/)
 * (@seokai)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/awefully-programmed/#post-13327500)
 * That may be true for CSS and form-specific JS, but why is jQuery and the Recaptcha
   JS loaded on every page, even when no form at all is displayed?
 *  [Jared Atchison](https://wordpress.org/support/users/jaredatch/)
 * (@jaredatch)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/awefully-programmed/#post-13330500)
 * Hey [@seokai](https://wordpress.org/support/users/seokai/),
 * Unless a form is placed in location that displays globally on your site (such
   as a footer widget), all WPForms assets and dependencies – including jQuery and
   reCAPTCHA – are only loaded for pages that contain a form.
 * Just to triple check this, I spun up a new WordPress install with only the TwentyTwenty
   theme and WPForms Lite activated. I then created a `/contact` page which has 
   WPForms embedded on it.
 * Viewing the home page and looking at the source, there’s no references to jQuery(
   [https://a.cl.ly/DOuxr7mY](https://a.cl.ly/DOuxr7mY)) or reCAPTCHA ([https://a.cl.ly/WnuJDPq4](https://a.cl.ly/WnuJDPq4)).
 * However, once I go to the Contact page which contains a form jQuery ([https://a.cl.ly/OAuqje80](https://a.cl.ly/OAuqje80))
   and reCAPTCHA ([https://a.cl.ly/YEuoW0kb](https://a.cl.ly/YEuoW0kb)) are indeed
   included.
 * I know that it’s common theme and plugin functionality to require jQuery, so 
   my best guess is likely the theme or another plugin that is requiring it globally.
 * With reCAPTCHA, it’s not as common, but we have seen themes that integrate with
   reCAPTCHA out of the box load the embed script globally. If you look at the reCAPTCHA
   script tag, if it doesn’t contain `wpformsRecaptchaLoad` ([https://a.cl.ly/xQuLx8N0](https://a.cl.ly/xQuLx8N0))
   then that’s a good indicator it’s loading from a call outside WPForms.
 * Worth nothing, it IS possible to load WPForms assets on every page, but it’s 
   not enabled by default – it’s a nuclear option we provide to users with theme
   conflicts and similar. Just to be safe, if you go to your WPForms Settings, you’ll
   see a checkbox for “Load Assets Globally” ([https://a.cl.ly/jkuZWN0k](https://a.cl.ly/jkuZWN0k)).
 * As far as jQuery as a dependency in general, I do agree that it would be ideal
   to not need jQuery at all. The thing with that is many of the libraries we use(
   validation, time picker, payment validation, etc) are jQuery libraries – so finding
   adequate replacements for these all while attempting to keep backwards compatibility
   would be a big under taking. That’s not to say it won’t happen, but it will take
   careful planning and execution.
 * The other thing is jQuery provides us with a toolkit of helper functions. The
   library itself is around 34kb gzipped delivered, but refactoring all functionality
   with vanilla JS and then transpiling could very well negate any gains ditching
   the dependency itself.
 * Lastly, we do very much care and pay attention to page load times and general
   site overhead, because with over 3M sites using WPForms, it’s our duty. We do
   frequently profile and benchmark releases, so if you see something that looks“
   off” to you, please let us know so we can investigate.
 * Anyways, we do really appreciate all feedback. Hope this helps provide some context
   to things.
 * Have a great weekend,
 * Jared
 *  Thread Starter [Kai Spriestersbach](https://wordpress.org/support/users/seokai/)
 * (@seokai)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/awefully-programmed/#post-13330520)
 * Hi Jared,
 * I really appreciate your effort and am deeply sorry – the cause was another plugin(
   hummingbird) which tries to help with pagespeed, but unfortunately make all enqueued
   scripts and stylesheets global!
    So it is not WP Forms fault – I changed my review
   to reflect that!
 * Sorry for the hassle

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

The topic ‘Nearly perfect, but jQuery dependent :(’ is closed to new replies.

 * ![](https://ps.w.org/wpforms-lite/assets/icon.svg?rev=3254748)
 * [WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More](https://wordpress.org/plugins/wpforms-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpforms-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpforms-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wpforms-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpforms-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpforms-lite/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Kai Spriestersbach](https://wordpress.org/support/users/seokai/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/awefully-programmed/#post-13330520)