jQuery 1.11, 2.1 And The Split Between Old IE And Modern Browsers

By early 2014, jQuery had been part of my front-end work for long enough that it almost felt like part of the browser.

That probably sounds strange now, but at the time it was a very normal way to build client websites. If I needed to handle a click event, open a menu, make an Ajax request, animate a panel or smooth over browser behaviour, jQuery was usually already there. It gave me a reliable layer between the design I wanted to build and the browsers I had to support.

The January releases of jQuery 1.11 and 2.1 were interesting because they made a decision that many developers were already making in client projects. The 1.x branch continued to support older Internet Explorer versions, while the 2.x branch could focus on modern browsers and environments where that old support was no longer needed. The code was not just changing. The support conversation was becoming more explicit.

That mattered because browser support was never only a technical preference. It affected the size of the scripts, the amount of testing, the way interactions were written and how much time could be spent improving the experience instead of fighting legacy behaviour.

The Browser Support Decision Was Becoming More Honest

For years, a lot of website work carried old Internet Explorer support by default. Sometimes that was necessary because a client had real users on those browsers. Sometimes it was included because nobody wanted to be the person who suggested removing it. That default position started to feel more expensive as websites became more interactive and mobile browsing became more important.

The useful part of jQuery maintaining separate branches was that it reflected the decision more clearly. If a site needed to support IE6, IE7 or IE8, the 1.x branch made sense. If the project could target modern browsers, the 2.x branch avoided carrying the same baggage. That did not remove the need to understand the audience, but it made the choice harder to ignore.

At the time, I would usually start by looking at the real usage of the site. If a business website still had a meaningful number of visitors using older browsers, dropping support just because the development experience felt nicer would have been careless. If almost nobody used those browsers, continuing to optimise the whole front end around them was also hard to justify.

That was the shift I noticed. Support decisions were becoming less about personal preference and more about evidence. Which browsers were people actually using? Which parts of the site needed to work for them? What was the cost of keeping an older browser inside the build?

Why jQuery Still Earned Its Place

It is easy to look back and describe jQuery as something we eventually moved beyond, but that misses why it was so useful in the first place.

In 2014, client websites still had to work across a messy range of browsers. Native JavaScript was improving, but jQuery made common interface work quicker and more predictable. It also meant a developer could write readable behaviour without constantly checking whether a browser handled an event, selector or Ajax call differently.

A simple delegated event handler was often enough to keep an interface flexible when content changed after page load.

$(document).on('click', '[data-toggle]', function (event) {
    event.preventDefault();

    var target = $(this).data('toggle');

    $(target).toggleClass('is-active');
});

That kind of code was practical. It was not trying to turn the website into a complicated application. It let the page respond to normal user actions without having to write the same browser handling again and again. For many agency projects, that was exactly the level of JavaScript the site needed.

Where jQuery Started To Become A Problem

The problem was not jQuery itself. The problem was how easily a site could become dependent on a pile of jQuery plugins added at different stages of the project.

One plugin would handle a slider, another would handle a lightbox, another would handle validation and another would handle a menu. Each one solved a small problem, but together they could make the front end heavier and harder to understand. A visitor did not care that each feature had its own plugin. They only experienced the page taking longer to load or behaving strangely on a phone.

I started becoming more selective about where jQuery was doing useful work and where it was hiding a lack of decision-making. If a plugin was saving a few minutes during the build but adding weight to every visit, it needed to justify itself. If the behaviour could be written clearly in a few lines, I would rather do that than carry another dependency.

That thinking became more important as responsive websites became normal. JavaScript could not just be tested on a desktop screen anymore. Every interaction had to make sense on smaller screens, touch devices and slower connections.

What I Took From The Split

The main thing I took from the jQuery 1.11 and 2.1 split was that front-end development was becoming more deliberate.

It was no longer enough to include a library because it had always been included. The browser support decision, the size of the scripts and the amount of behaviour added to the page all needed more thought. A website could still use jQuery well, but it needed to be used as part of a considered front-end approach rather than as a default answer to every interaction.

I still think that is a useful way to look at older tools. They were not wrong because newer approaches arrived later. They solved real problems at the time. The important question was whether the problem still existed on the project in front of me.

In 2014, jQuery was still useful, but the conversation around it was changing. The split between old browser support and modern environments made that change easier to see.