If you’ve been using jQuery — the lightweight, “write less, do more” library to bring interactive effects to your websites — you may have missed last spring’s 2.0 release.
The good news is that jQuery 2.0 is faster and smaller than all previous versions. The bad news: Because jQuery 2.0 is designed for the modern web, it no longer supports legacy versions of Microsoft Internet Explorer, including IE 6, IE 7 and IE 8. This is a bold move by the jQuery team and has stirred some debate among many web developers.
Among the environments the jQuery team won’t support 1.x versions, which they have confined to non-web scenarios where older IE support isn’t necessary:
- Google Chrome add-ons
- Firefox OS apps
- Chrome OS apps
- BlackBerry 10 WebWorks apps
- Apple UIWebView class
jQuery a boon to create interactive effects
With nearly 17 million sites on the web using jQuery, you are most likely to visit or develop one with this script library packed. It has been extremely helpful to bring interactive effects to websites without having to worry about cross-browser capabilities (even on the mobile side).
With the release of 2.0, jQuery Foundation President Dave Methvin urged developers to reference only a “specific version” on their websites and to use any non-specific version is considered harmful to a website’s health and performance.
According to a recent report by w3schools.com, however, IE 8 still remains the most used version of Microsoft Internet Explorer as of August, so it is possible that visitors are still visiting your site using one of the legacy versions.
To account for this possibility, jQuery’s 1.9 series will offer full API compatibility with 2.0 but will have full support for older versions of IE. It will also be maintained with bug fixes addressed on an ongoing basis. Other the notable changes in jQuery 2.0:
- The final 2.0.0 is slightly smaller than the previous 1.9.1 file due to eliminating software patches only needed for IE 6, 7 and 8.
- Because combinations of 12 different modules have been excluded, custom builds can be created to be much smaller files.
Although most developers agree that legacy versions of IE will eventually be phased out, IE 8 has lingered longer than Microsoft or most computing experts ever expected.
The jQuery team’s pragmatic approach to phase out legacy IE support will serve the needs for Web developers and end users for now. But for all developers, proceed with caution when updating your jQuery script to ensure the end user experience will not be affected adversely.
An easy way to avoid problems updating jQuery: Simplify the transition from older versions by using the jQuery Migrate plugin. While the plugin restores features so older code will run on jQuery 1.9 or later versions, it’s advisable to use the uncompressed development version to identify compatibility issues you can fix easily.