Should You be Using jQuery 3.4?

Ben Moss.
July 04, 2019
jQuery 3.4 is now publicly available. With a raft of options for JavaScript developers, we ask if there’s still room for the original JavaScript superstar, or if the web’s moved on.
Should You be Using jQuery 3.4?.
Back in April, jQuery 3.4 was released with all the pomp and ceremony of a British monarch on the 4th of July (happy Independence Day to all our American readers). There have been a flurry of minor releases since then, with the current version being 3.4.1. We’ve had a few weeks to poke around, and check out the new features, and more importantly the now deprecated features. What we found was a modern library that defied a few of our expectations.

It’s Not Bloated

There are quite a few myths built up around jQuery, not least that it is bloated and slow. There’s some sense to this, containing as it does code that you probably won’t need. However this is true of all libraries, frameworks, and 3rd party scripts; unless you’re using something so niche that there is nothing superfluous wrapped up in the code, then there will always be a few bytes here and there that aren’t required. [pullquote]drop a jpg and you’ll probably have room to spare[/pullquote] But let’s keep this in proportion: the raw, minified, production version of jQuery is 88kb, if you opt for the slim version without Ajax and the effects, then it’s just 71kb. If you’re working to a strict size quota it’s relatively simple to squeeze 71kb out of a few images. Better yet, drop a jpg and you’ll probably have room to spare.

It’s (Probably) Not Cached

One of the greatest benefits of jQuery circa 2014, was that it was all but ubiquitous. Almost every site took advantage of this by linking directly to the jQuery CDN meaning that more often than not it was cached in the user’s browser – you could, in effect, use it for zero size cost. jQuery usage has dipped in recent years, thanks in part to rival libraries, and thanks in part to the belief that vanilla JavaScript is superior. Fewer sites are linking to the CDN, fewer browsers have the file cached, and so it will probably need to be downloaded before it’s available. The problem is compounded by the release for version 3.4, because although plenty of legacy sites are still loading jQuery from the CDN, by their nature they aren’t linking to the current version. The jQuery team have gone to great lengths to help you upgrade but project cycles and code adoption means that jQuery 3.4 is probably at least several years away from comprehensive coverage.

You Don’t Need to Know Vanilla JavaScript

One of the most oft-repeated myths – or perhaps I should say ‘untruths’ in this case – is that you should learn vanilla JavaScript before you can use jQuery well. [pullquote]View jQuery as a set of training wheels[/pullquote] I detest this view. I understand the logic; if you learn the underlying logic of the language, you’ll understand what’s happening behind the scenes and have a nuanced understanding of your code. People who perpetuate that view have forgotten what it feels like to be trawling Stack Overflow at three in the morning struggling to understand why document.getElementsByClassName needs a [0] on the end. Yes, you do need to understand language basics, like variables, loops, conditionals, operators, and so forth; you’ll need to know those with or without jQuery. View jQuery as a set of training wheels, it does the hard stuff for you, so the easy stuff has a chance to become second nature. I would argue that if you want to learn JavaScript, you should learn jQuery first. It will hold your hand through the tougher tasks (like Ajax) while you practice your fundamentals. And I say that as someone who spends a great deal of time coding vanilla JavaScript.

There’s No Longer a Rich Ecosystem

There was a time when jQuery developers were queuing up to deliver time-saving, feature-pushing, bolt-ons. That’s no longer the case. The web has moved on, and the gun-for-hire developers are chasing more lucrative markets, like Shopify, or WordPress. Legacy jQuery plugins (should) still work, and in the case of version 2.n plugins – thanks to the jQuery team’s commitment to backwards compatibility – will (probably) not break using 3.4. (Do make sure to test with the development version of jQuery and check your console, if you’re going down this route.) There will undoubtedly be some kind of market for jQuery 3.4 plugins, and those developers who deem it financially worthwhile to update their code will do so. So for plugins, the release of jQuery 3.4 may actually prompt a long-overdue cull.

Should You be Using jQuery 3.4?

For many of us, jQuery is a tool we used years ago, and have since moved on. There are better tools for handling Ajax; jQuery still doesn’t play nice with SVG, making its use for DOM manipulation increasingly limited; there are copycat libraries that mimic the best aspects of jQuery, like the selectors, without packaging up everything else. jQuery isn’t going to challenge Vue.js, or AngularJS. jQuery is no longer the must-befriend big kid on the block. What jQuery does is simplify JavaScript’s verbosity and enable inexperienced JavaScript coders to maximize their use of the language. If you’re new to JavaScript, or if you’ve tinkered with it before without ever being able to do anything really cool, then jQuery is still exactly what you’re looking for. Featured image partly via Unsplash.

Ben Moss

Ben Moss has designed and coded work for award-winning startups, and global names including IBM, UBS, and the FBI. When he’s not in front of a screen he’s probably out trail-running.

Read Next

15 Best New Fonts, September 2024

Welcome to our roundup of the best new fonts we’ve found on the web in the previous four weeks. In this month’s edition…

3 Essential Design Trends, October 2024

This article is brought to you by Constantino, a renowned company offering premium and affordable website design You…

A Beginner’s Guide to Using BlueSky for Business Success

In today’s fast-paced digital world, businesses are always on the lookout for new ways to connect with their audience.…

The Importance of Title Tags: Tips and Tricks to Optimize for SEO

When it comes to on-page SEO, there’s one element that plays a pivotal role in both search engine rankings and user…

20 Best New Websites, September 2024

We have a mixed bag for you with both minimalist and maximalist designs, and single pagers alongside much bigger, but…

Exciting New Tools for Designers, September 2024

This time around we are aiming to simplify life, with some light and fast analytics, an all-in-one productivity…

3 Essential Design Trends, September 2024

September's web design trends have a fun, fall feeling ... and we love it. See what's trending in website design this…

Crafting Personalized Experiences with AI

Picture this: You open Netflix, and it’s like the platform just knows what you’re in the mood for. Or maybe you’re…

15 Best New Fonts, August 2024

Welcome to August’s roundup of the best fonts we’ve found over the last few weeks. 2024’s trend for flowing curves and…

Turning Rejection into Fuel: Your Guide to Creative Resilience

Rejection sucks. And for some reason, it’s always unexpected, which makes it feel like an ambush. Being creative is…

20 Best New Websites, August 2024

The overarching theme in this selection is simplicity. Minimalism never really goes out of fashion and with good…

Free AI-Website Builder, Scene, Helps With the Worst Part of Site Design

AI website design platform, Scene As we’ve been hearing constantly for the last couple of years, AI will soon replace…