Don’t Use jquery-latest.js (jQuery Blog Reblog)

This is simply passing on a warning from the jQuery blog post entitled “Don’t Use jquery-latest.js. For some time now, the jquery-latest.js file from their CDN has been heavily used and abused in production sites. jquery-latest.js was initially created as a quick way to test out the latest build of jQuery. Unfortunately, it seems many people have used this file as a way to always have the latest version of the popular JavaScript library on their site. This is a very bad idea, as each breaking change performed would make break each site that relied on it. Back in 2013 the jQuery team decided to not update jquery-latest.js to jQuery 2.0 on behalf of older sites that would suddenly break because of the new Internet Explorer support limits. However, that has not stopped people from using it.

As jQuery usage increases and to prevent this abused file from “breaking the web”, from now on (when this news was reported on July 3), the jquery-latest.js and jquery-latest.min.js files have been locked to v1.11.1 forever. They will no longer be updated. Google has also joined in the efforts and locked their CDN equivalent to v1.11.1. Further more, a few members of the community and apparently the developers themselves have discussed adding some sort of warning to these files urging developers to no longer use them, an action I would support.

So what does this mean for you and what should be your reaction? Do not use the jquery-latest.js and jquery-latest.min.js files in development nor production sites. Instead, always use a version release from the CDNs (1.11.1 or 2.1.1). It is as simple as that.

So please, tell your developer friends about this and do yourself, them, and the entire Web a favor by never using these files again and updating any current sites to use a version release. 🙂

-le717

Advertisements

2 thoughts on “Don’t Use jquery-latest.js (jQuery Blog Reblog)

  1. A good middle-ground is to use jsDelivr’s version aliasing. It is unlikely a point release will change APIs, but it is helpful to auto-update bug fixes. So you can

    so you’ll grab v2.1.1 today, v2.1.2 bugfixes if that gets released, but not v2.2.0 which may behave differently.
    Better yet, use concocting:

    https://github.com/jsdelivr/jsdelivr#usage

Triangular Reactions

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s