• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero Blog

NameHero Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • VPS Hosting
    • WordPress Hosting
    • WooCommerce Hosting
  • Reseller
  • Enterprise
  • Domains
  • Account
  • Blog Home
  • Categories

It’s Time for WordPress To Reduce Its Reliance On jQuery

Bhagwad Park

Published on: April 8, 2020

Categories: WordPress 0

This morning when I went to my site’s dashboard, I saw that the Automattic team had released the latest version of the Jetpack plugin – 8.4. As per my usual habit of never updating a plugin until at least 4 days had passed, I first went through the update notes to see if there were any security fixes that made it an urgent upgrade. As it turns out there were none, but, the following items caught my eye:

Jetpack moving away from jQuery
Is Jetpack Moving Away from jQuery?

It looks like Jetpacks is trying to improve its performance by reducing its reliance on the jQuery library. This made me happy for many reasons, even though I personally only use the lazy loading functionality. The reason is that it might indicate a shifting away by WordPress from the ubiquitous jQuery library. Here’s why I think that’s a good thing.

jQuery is Everywhere

Around 75% of all website use jQuery. On an Internet where there are so many disparate platforms, it’s amazing that a single technology can come to dominate to completely in its niche. While it’s great that plugin developers can rely on the easy availability of jQuery on their websites, it poses a significant problem when it comes to page loading speeds.

You see, the very ubiquity of jQuery demands that you load it in the header! If you try and “defer” or “async” jQuery so that it loads later, you’ll quickly see that you end up breaking functionality on your site that depends on it. Even if your site works fine now, sooner or later you’re going to install a plugin or something that relies on jQuery being available and when it breaks, you’ll have no idea why it’s not working. Trust me – I’ve been there. Pulling your hair out wondering why a piece of Javascript doesn’t work, only to realize (much later) that the flaw was with the deferring of jQuery in the first place.

Render Blocking is a Problem

Now if this was only about download speeds, I wouldn’t mind too much. Bandwidth these days is expanding so fast, that the measly 33 KB or so of the jQuery download would be insignificant. In the worst-case scenario, you’re dealing with a laggy mobile connection in a place where Internet speeds reach dial-up levels of slowness. But fine, I’m willing to live with that edge case scenario.

The issue isn’t about download times though. It’s about the problem of parsing and rendering the content. As the jQuery library becomes more and more functional, its complexity increases, and browsers are very far from being uniformly fast at parsing it. The problem is compounded when we consider mobile phones that are far less powerful than desktop browsers, and which take an inordinate amount of time to render jQuery.

A CDN Is Only Partly Useful

Here at NameHero, we’ve explained before about how to properly load jQuery from a CDN, and it certainly helps – particularly if the client has already pre-fetched the DNS records and doesn’t have to make another call to resolve it. But it doesn’t solve the problem of jQuery taking so long to render at the beginning of every single page load.

Ultimately, I haven’t yet found a good solution to this problem. It might be that we’ll have to break up jQuery into smaller bits or something to achieve better results. Or better still, perhaps try and avoid using jQuery in the first place. The recent changes to the Jetpack plugin give me hope that developers are starting to move away from jQuery, and we’ll finally be able to do something to speed up our webpages without having a massive frontload that delays the showing of content!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!

Most Popular Posts

Speed up your site: solving the WordPress slowdown

NameHero’s Recommended WordPress Plugin and Theme Setup (2023)

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • Website Performance
  • Web Hosting
  • Resellers
  • Website Development
  • Website Security
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Domains
Help & Support
  • NameHero Blog
  • Knowledgebase
  • Announcements
  • Affiliates
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2023 NameHero, LLC. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA