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

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

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

By Bhagwad Park on April 8, 2020 0

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

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

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • The Best WordPress Plugin To Combat Plagiarism
  • Is It Time to Bring Back Blog Comments?
  • Two Filters That No Longer Work In Gutenberg (And Workarounds)
  • Migrating To The New Cloudflare Managed Rules Interface
  • How To Sort Posts By The “Last Modified” Date
  • How To Make WordPress Send E-mail From Another Address
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2023 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in