In association with heise online

16 January 2013, 13:16

jQuery 1.9 prepares developers for the dropping of old IE support

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

jQuery logo 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:

<!--[if lt IE 9]>
<script src="jquery-1.9.0.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="jquery-2.0.0.js"></script>
<!--[endif]-->

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.

The new version of the MIT-licensed jQuery 1.9 is available from various locations listed in the jQuery downloads page. jQuery 2.0 beta is available at http://code.jquery.com/jquery-2.0.0b1.js on the jQuery CDN as is jQuery Migrate 1.0.0 (http://code.jquery.com/jquery-migrate-1.0.0.js) while source code can be found on the jQuery GitHub repository.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1785199
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit