jQuery 2.0 Released! Smaller and Faster with Few Important Changes

Posted on April 22, 2013 by Dan Doicaru in jQuery/JavaScript Category

jQuery has released their most recent version which is 2.0. As promised, this version leaves behind the older Internet Explorer 6, 7, and 8 browsers. In return it is smaller, faster, and can be used in JavaScript environments where the code needed for old-IE compatibility often causes problems of its own.

Where to Get It

The final jQuery 2.0.0 files can be found here on the jQuery CDN:

The files should also be available on the Google and Microsoft CDNs soon, but be patient few days before releasing a storm of impatient tweets. Also remember that production web sites should be requesting a specific version from any CDN; using a non-specific version like /2/ or jquery-latest.js is considered harmful to your web site’€™s health and performance.


How 2.0 Changed

Here are some highlights of the changes that jQuery 2.0 brings:

No more support for IE 6/7/8: Remember that this can also affect IE9 and even IE10 if they are used in their ’€œCompatibility View’€ modes that emulate older versions. To prevent these newer IE versions from slipping back into prehistoric modes, we suggest you always use an X-UA-Compatible tag or HTTP header. If you can use the HTTP header it is slightly better for performance because it avoids a potential browser parser restart.

Reduced size: The final 2.0.0 file is 12 percent smaller than the 1.9.1 file, thanks to the elimination of patches that were only needed for IE 6, 7, and 8. We had hoped to remove even more code and increase performance, but older Android/WebKit 2.x browsers are now the weakest link. We’€™re carefully watching Android 2.x market share to determine when we can cross it off the support list, and don’€™t expect it to take very long.

Custom builds for even smaller files: This feature has been greatly refined and extended since its debut in jQuery 1.8. You can now exclude combinations of 12 different modules to create a custom version that is even smaller. A new minimal selector engine, basically a thin wrapper around the browser’€™s querySelectorAll API, lets you shrink the build to less than 10KB when minified and gzipped. See the README for instructions on how to create a custom build, and remember that any plugins you use will also need to stick to the subset you select.

Read More

Rate & Share
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Related Articles
Hint: Wrap your code syntax (html, css or others) between <pre> and </pre> tags. All comments are moderated.

7 + 2 =

Subscribe by E-mail

HTML-TUTS is created and maintained by Dan Doicaru.
This website is a rebrand to Extreme Design Studio (extremestudio.ro), built under WordPress platform.