WordPress.org

Ready to get started?Download WordPress

Forums

Google Forms
Linked query.validate.js CDN slow (6 posts)

  1. njs
    Member
    Posted 7 months ago #

    Hi
    I've been noticing that the query.validate.js script has been very slow to download from the CDN at times, causing overall page load issues.

    Has anybody else noticed this; is there a way to link to this internally instead of via ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1 ?

    Thanks

    http://wordpress.org/plugins/wpgform/

  2. Mike Walsh
    Member
    Plugin Author

    Posted 7 months ago #

    It isn't included with WordPress which is why I link to it externally. When I first used jQuery Validate, it wasn't available on the Google CDN but I think it is now. I'll check and if it is available, I'll add an option to load it from Google's CDN instead of Microsoft's CDN.

  3. njs
    Member
    Posted 7 months ago #

    OK great.

    If I was to manually enqueue the script myself (for whatever reason), would the plugin detect this and therefore skip adding the script itself?

    Also, if I choose to disable using jQuery validation, the script is stil loaded regardless it seems. Would be good if the script was not loaded if the option to disable jQuery validation is used.

    I thank you sir!

  4. Mike Walsh
    Member
    Plugin Author

    Posted 7 months ago #

    No, the plugin doesn't do any checking to see if it is already loaded but that doesn't mean it couldn't. I'll look into that. Even if Validation is disabled, jQuery Validate is also used for CAPTCHA.

    If you don't use either Validation or CAPTCH, technically there is no need to enqueue jQuery Validate although that can vary from form to form. The jQuery Validate script is enqueued at the plugin level very early in the process as opposed to at the form instance level. It might be possible to remove it from the queue however I don't think there is a way to determine that it isn't needed by another plugin so removing it from the queue might be problematic.

    I'll have to think about it.

  5. njs
    Member
    Posted 7 months ago #

    Uh oh, can of worms eh!
    The issue will probably be resolved if the Google CDN is an option though so no worries.

  6. Mike Walsh
    Member
    Plugin Author

    Posted 7 months ago #

    I just checked and it does not appear that Google offers up the jQuery Validate plugin on their CDN. If you can find it I will be happy to add it but I didn't see it.

Reply

You must log in to post.

About this Plugin

About this Topic