[Resolved] Is it possible to avoid jQuery ?

Home Forums Support [Resolved] Is it possible to avoid jQuery ?

Home Forums Support Is it possible to avoid jQuery ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #952827
    Michael

    I like the idea of Vanilla Script but it seems so many plugins depend on jQuery.
    If we want to be 100% Vanilla, thus not loading Jquery at all, then we need to build everything from scratch?
    Something that struck me: On my test installation, just activating “Wordfence security” will make GP load jquery on my site? http://0a1iixioq.preview.infomaniak.website/
    (the console says : JQMIGRATE: Migrate is installed, version 1.4.1)

    Because of that, right now i am not willing to make the effort for Vanilla.
    Wordpress is based on the community and the community provides plugins!
    We can’t just stop using those plugins.

    Thank you for your feedback ๐Ÿ™‚

    #952844
    David
    Staff
    Customer Support

    Hi there,

    first off GP only enqueues jQuery if you’re using the Sticky Navigation. It is the only JS that we have yet to replace with vanilla JS.

    I think WordFence only calls for jQuery when an Admin is Logged in to the site for some of the admin UI’s and to allow ajax requests to be passed via their firewall. Check your site logged out – i can’t see it being requested.

    Of course if there is a must have plugin that requires jQuery then it trying to go 100% vanilla is an impossibility.

    #953591
    Michael

    Thanks for solving my problem with Wordfence.
    Another plugin that loads jquery: contact form 7
    I found only one vanilla script plugin for contact forms:
    https://codecanyon.net/item/vanilla-form-modern-responsive-contact-form/10447733
    Or i could unload scripts from contact form 7 and only load on contact pages…
    This vanilla idea is cool but a lot of additional work i guess.
    Every time i use a plugin i need to take care of that
    AND if only one plugin needs jquery site wide, the all vanilla script becomes worthless
    (i am thinking about RGPD, or marketing related plugins).
    Websites optimised for speed should be sold double the price.

    ๐Ÿ™‚

    #953888
    David
    Staff
    Customer Support

    Yeah couldn’t find any other Vanilla JS forms – the WordPress plugin space is heavily jQuery based. So definitely a challenge to avoid it.

    #2014962
    Antonio

    Hello,
    is there any update about this?

    Seems like sticky menu is still loaded using Jquery and this causes a 6 points decrease in PageSpeed Insight Score.

    Thank you

    #2015034
    David
    Staff
    Customer Support

    Hi there,

    not yet – its only the Sticky Navigation that requires jQuery – all other dependencies have been removed. We’ll be reviewing the sticky nav next year.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.