Channels

Services

jQuery 1.9 prepares developers for the dropping of old IE support

The jQuery developers are preparing to drop support in the popular JavaScript framework for older versions of Internet Explorer with the release of jQuery 1.9 and a beta of jQuery 2.0. The dropping of support for Internet Explorer versions before IE 9 and the migration plan has been in place since June 2012.

Both 2.0 and 1.9 share the same API, but while 1.9 will support IE 6, 7 and 8, jQuery 2.0 will only support IE 9 or later. jQuery has a lot of code which has accumulated over time to support what the developers call "oldIE" and the jump to 2.0 is being orchestrated so that they can continue supporting users of the library with one version, while having a cleaner code base for future development work in versions after 2.0. The developers suggest the use of conditional code such as:

to automatically switch between the optimal version of the library. The jQuery 2.0 beta is ten per cent smaller than the 1.9 release and the development team believe that they can go further as more refactoring is possible now that they can consistently depend on modern JavaScript, CSS, HTML and DOM features.

The release is not just about the preparatory work for dropping oldIE. jQuery 1.9, and by extension jQuery 2.0, introduce a number of changes and remove deprecated or dubious features to help produce a new streamlined API; details of the changes that the developers think will impact developers are listed in the 1.9 Upgrade Guide. A new .css() property getter now allows multiple CSS properties to be retrieved in a single call and a .finish() method can signal the framework to immediately complete queued animations on an element. The developers added a range of new CSS3 selectors and the ability to use source maps which allow compressed/minified code to be debugged as if it were the original source files.

To simplify the process of checking for changes, deprecations or removed functions, the jQuery team have also released jQuery Migrate, a plugin designed to help with the migration of code to jQuery 1.9 and later. The migrate plugin not only spots when deprecated functionality is in use and warns but can also restore APIs to allow production code to continue running.