BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

jQuery 1.11 & 2.1 Now on npm and Bower

| by Abel Avram on Jan 24, 2014. Estimated reading time: 2 minutes |

The latest jQuery can be obtained from npm and Bower, has some performance improvements and bug fixes.

The jQuery team has released another synchronized version of their popular JavaScript library, 1.11 and 2.1.0. The source and minified files can be obtained from the download page, but they can also be accessed with npm or Bower. Other package managers are not planned to be supported at this time.

The latest jQuery has better performance with fewer forced layouts and a lower startup overhead:

Fewer forced layouts: In this release we declared war on places where we might inadvertently force the browser to do a time-consuming layout. We found a few and eliminated one in particular that could occur when changing class names. This can result in a big performance boost for some pages.

Granular custom builds: Our modularity is now defined by AMD, and it is easier to build small subsets of the library when space is at a premium. If you want to know more, we’ve hidden the details in the README file where nobody ever looks.

Lower startup overhead: The new modularity and avoidance of forced layouts led us to refactor our feature detects so that they run the first time they’re needed. If you never call the API needing that feature detect, you never run that code. Previously we ran all feature detects when the page loaded, that led to delays that were generally small, but added up–especially on mobile platforms.

The sourcemap comment in the minified file has been removed to avoid confusion among developers:

This release does not contain the sourcemap comment in the minified file. … We’ll still be generating and distributing sourcemaps, but you will need to add the appropriate sourcemap comment at the end of the minified file if the browser does not support manually associating map files (currently, none do). If you generate your own jQuery file using the custom build process, the sourcemap comment will be present in the minified file and the map is generated; you can either leave it in and use sourcemaps or edit it out and ignore the map file entirely.

A number of bugs have been fixed.

The jQuery 1.11 branch supports older browsers (IE 6, 7, 8) while the 2.1.0 branch adds support for developing in Node.js, Chrome and Firefox extensions, and other non-traditional web environments.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT