Slashdot Mirror


jQuery 2.0 Will Drop Support For IE 6, 7, 8

benfrog writes "The developers of jQuery recently announced in a blog entry that jQuery 2.0 will drop support for legacy versions of Internet Explorer. The release will come in parallel with version 1.9, however, which will include support for older versions of IE. The versions will offer full API compatibility, but 2.0 will 'benefit from a faster implementation that doesn't have to rely on legacy compatibility hacks.'"

48 of 250 comments (clear)

  1. Like by Krojack · · Score: 4, Insightful

    I like this however I'm guessing anyone that starts using this will have a boat load of complains thus 2.0 won't be used for several years. Sadly. Damn IE slowing down even non-IE users!

    1. Re:Like by Kate6 · · Score: 5, Informative

      You see the bit where it says "full API compatibility"? That means with a few lines of PHP (or some equivalent back-end language) you can have a look at the user's browser USERAGENT string, figure out if it's an MSIE browser or not and serve the preferable version of jQuery... 1.9 for legacy IE, 2.0 for IE9 and for standards compliant browsers. And the "full API compatibility" means the rest of your code will play nice with either.

    2. Re:Like by man_of_mr_e · · Score: 2

      Or use Modernizr's browser identification.

    3. Re:Like by man_of_mr_e · · Score: 2

      This is fine for 1.9/2.0 but what happens when 2.1 and 2.2 come out? The API's will diverge.

      I hope 1.9 stays api compatible, but I would doubt it.

    4. Re:Like by Kate6 · · Score: 3, Interesting

      There's already a fair bit of divergence between what you can do in IE and what you can do in other browsers.  IE (including IE9) doesn't implement as much of HTML5 as other browsers.  IE's SVG support is in its infancy compared to other browsers', and completely nonexistent before IE9.

      So we might end up with some jQuery functionality silently being disabled in legacy versions of IE too.  Big whoop.

    5. Re:Like by cyber-vandal · · Score: 2

      This is a far better way since anything non-IE pretending to be IE will just ignore these. Web designers have been using these for years to load special CSS workarounds for all the bugs in IE.

    6. Re:Like by dingen · · Score: 4, Informative

      But .delegate(), .on() and .live() all still work with recent versions of jQuery, so your old code still runs with newer versions of the library. New features being introduced is not bad. The pain starts when old features are dropped.

      --
      Pretty good is actually pretty bad.
    7. Re:Like by madprof · · Score: 4, Insightful

      Holy moley. I might be saying what others say but please, for the love of everything good, use conditional comments.
      They've been around since IE5. You will love them.

    8. Re:Like by Serious+Callers+Only · · Score: 2

      Another possibility is to use jquery 2 for all other browsers and jquery 1.9 for ie 10 via conditional comments.

    9. Re:Like by Art3x · · Score: 4, Informative

      with a few lines of PHP (or some equivalent back-end language) you can have a look at the user's browser USERAGENT string, figure out if it's an MSIE browser or not and serve the preferable version of jQuery... 1.9 for legacy IE, 2.0 for IE9 and for standards compliant browsers.

      Or do it with HTML comments (this actually works):

      <!--[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]-->

      Less code. Also you've offloaded the CPU processing from your server to the user's browser.

      This was in the article by the way. . . . Oh . . . nevermind.

    10. Re:Like by omfgnosis · · Score: 3, Insightful

      If you look at a set of the available conditional comments in an editor with proper syntax highlighting, it'll become obvious immediately how they work: everything that is targeted at IE (or specific versions thereof) is technically inside an HTML comment and ignored by other browsers; IE parses these comments and, in the presence of conditional directives it determines (by version) whether to treat them as if outside an HTML comment. Everything that targets non-IE browsers is outside of a comment, but IE will treat it as a comment.

      This is a comment, unless loaded in IE versions 8 and below:
      <!--[if lte IE 8]><script src="/path/to/jquery19.js"><![endif]-->

      This is a comment, unless loaded in IE versions 9 and above:
      <!--[if gte IE 9]><script src="/path/to/jquery20.js"><![endif]-->

      This is not a comment, unless loaded in IE:
      <!--[if !IE]><!--><script src="/path/to/jquery20.js"><!-- <![endif]-->

    11. Re:Like by jmerlin · · Score: 4, Informative

      User Agent hacks are incompatible with caching. Bad idea. Use conditional comments so IE gets its familiar old diaper and every other browser gets a shiny new car. Either that or propose an If-User-Agent header so proxies and caches can figure out whether your request is the same as a previous one.

    12. Re:Like by Alex+Zepeda · · Score: 3, Insightful

      Plenty of tards lead kick ass lives.

      --
      The revolution will be mocked
    13. Re:Like by toejam13 · · Score: 3, Informative

      You can just do this on a Layer 7 switch like a load-balancer.

      rule old_browser_rule {
        when HTTP_REQUEST {
          switch -glob [string tolower [HTTP::header User-Agent]] {
            "*msie 5*" -
            "*msie 6*" -
            "*msie 7*" -
            "*msie 8*" {
              pool jquery1_pool
            } else {
              pool jquery2_pool
            }
          }
        }
      }

      virtual www_80 {
        destination 1.1.1.1:80
        rules old_browser_rule
        profiles http tcp
      }

    14. Re:Like by makomk · · Score: 2

      Yes, it does. If you look closely the first script tag is in a comment as far as non-IE browsers are concerned whereas the second script tag is outside the comments and gets parsed.

  2. They seem to be missing the point... by Anonymous Coward · · Score: 2

    I thought a large part of the appeal of jQuery was that it allowed you to avoid writing the crufty legacy browser code that you would normally have to re-implement for every application. If they no longer offer that then what is the point of using it?

  3. IE Version Code Breakdown? by lavaforge · · Score: 2

    Does anyone here have enough knowledge of the JQuery codebase to say how the IE-specific cruft breaks down by version?

    IE6 is a monstrosity; that's pretty much a given, and IE7 isn't great either. I could see dropping support for both of those being a big win in terms of cleaning up the codebase. That said, how much do they gain by dropping IE8 as well? It was only released 3 years ago.

    1. Re:IE Version Code Breakdown? by tobiasly · · Score: 5, Informative

      Does anyone here have enough knowledge of the JQuery codebase to say how the IE-specific cruft breaks down by version?

      IE6 is a monstrosity; that's pretty much a given, and IE7 isn't great either. I could see dropping support for both of those being a big win in terms of cleaning up the codebase. That said, how much do they gain by dropping IE8 as well? It was only released 3 years ago.

      The "promoted reader comment" in the linked Ars article actually answers exactly that:

      Drizzt321 wrote:
      Wow, removing support for IE8? That's a really bold move. I can see IE6 & 7, those are rather old and should be deprecated and people should be really encouraged to move to newer versions.

      John Resig has said in interviews that most of the IE6 and IE7 code is needed for IE8 as well. While IE8 has far better layout and CSS engine evidently it still has pretty bad DOM API. Resig pointed out that dropping support for IE6 and IE7 would have very little impact on the size and complexity of the library unless they drop IE8 as well

    2. Re:IE Version Code Breakdown? by kawika · · Score: 4, Informative

      As far as bugs and quirks go, a lot of the ones in IE6 and IE7 are also present in IE8. In specific, things like eating HTML5 tags, the lack of true opacity support and the proprietary IE event model that used attachEvent instead of addEventListener. There's quite a bit of code in jQuery to deal with IE event issues, for example the lack of a bubbling change event. IE8 managed to plug some memory leaks and wasn't as bizarre with the "attroperties" issue as IE7 was, but they still have a lot of sins in common.

  4. So it's like Python 3 by tepples · · Score: 3, Insightful

    Developers tend not to write programs for Python 3 because most end users who have Python installed have Python 2 installed, and some Python environments (such as Windows) can't easily have multiple versions installed side-by-side. Likewise, developers will continue to use the jQuery 1.9 branch because until April 2014, when Windows XP reaches its end of life, a lot of people will still be using Internet Explorer 8.

    1. Re:So it's like Python 3 by dririan · · Score: 2

      some Python environments (such as Windows) can't easily have multiple versions installed side-by-side

      The Python installers on Windows install to (by default) C:\Python$MAJOR$MINOR (Python 2.7 installs to C:\Python27, Python 3.2 installs to C:\Python32). For scripts that require a certain version of Python, you may have to open it with the proper version yourself, because (obviously) .py files can only be associated with one program at a time. But for scripts made to be run by end-users, (assuming they don't ship their own Python runtime in the first place) a simple EXE wrapper can use the right interpreter. What part of this isn't easy?

      Also, many developers make things compatible with both, which is made much easier with 2to3. Quite a few setup.py scripts use 2to3 automatically even, to be compatible with both using the normal python setup.py install.

  5. Missing the point by bobetov · · Score: 4, Informative

    All, one of the big reasons for this move is to provide a cleaner, smaller, faster version of jQuery to apps dedicated to a given platform, such as iOS apps running as HTML5 shells. These applications know their "browser" environment, and thus can benefit from lack of IE support with no cost in terms of audience size.

    No one who has a general-public website should use 2.0 for years to come, but if you're developing a quickie Android app, or one of the dozen or so javascript-based desktop shells, etc, then this move is for you.

    --
    Looking for a Rails developer in Chapel Hill?
  6. IE6 and 7? by Anonymous Coward · · Score: 5, Insightful

    Find, finally kill the bastards. But 8?! This is the last IE available for XP, which is still widely used in companys....

  7. Good thing by mpol · · Score: 2

    I think it's a good thing. It might even be better if first IE6 and IE7 support was dropped, and IE8 support later, but that might be a lot of work.

    I axpect that for the first few years jQuery 1.9 will be the most used version, but you can afcourse load jQuery 2.0 on newer browsers, and only load 1.9 with conditional comments.

    I'm wondering how the big CMSs will handle this. Will Wordpress come with 2 versions for a few years?

    --

    Well, don't worry about that. We can get you back before you leave. (Dr. Who)
    1. Re:Good thing by Billly+Gates · · Score: 2

      Too bad I am working on a corporate oriented site. I can imagine IE 6 and 7 will be over 50% usage by the biggest customers who spend the most, even if they are a small minority overall.

      I should not have to be reading books on IE 6 hacks in 2012.

  8. Use 1.9 until 2014-04-08 by tepples · · Score: 2

    The alternative is sticking with jQuery 1.9 until April 8, 2014, and then flipping to jQuery 2.0.

  9. IE8 = "latest" version for many by tverbeek · · Score: 5, Insightful

    I can see dropping IE6 & IE7, because there's no sound reason for anyone to still be using them. But IE8 is the terminal version of IE for Windows XP, which remains one of the most widely-used operating systems on the planet. It's not going to go away just because someone doesn't want to support it any more.

    --
    http://alternatives.rzero.com/
    1. Re:IE8 = "latest" version for many by dingen · · Score: 5, Interesting

      The problem is that IE8 handles Javascript in much the same non-standard way als IE6 & IE7. If a library such as jQuery includes support for IE8, it's supporting IE6 & IE7 as well.

      --
      Pretty good is actually pretty bad.
    2. Re:IE8 = "latest" version for many by cyber-vandal · · Score: 4, Informative

      You can use conditional comments to load the older version of JQuery for IE6, 7 and 8 so it's not as bad as it seems. Web designers have been doing this for years to hack around Microsoft's incompetence,

    3. Re:IE8 = "latest" version for many by jellomizer · · Score: 4, Informative

      However my organization just Upgraded to IE 8.

      There isn't any plan to be going to 9 in the near future as there are too apps that have issues with following Open Standards.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    4. Re:IE8 = "latest" version for many by dingen · · Score: 2

      That's why the jQuery team is going to provide security fixes for 1.9 for a while.

      --
      Pretty good is actually pretty bad.
    5. Re:IE8 = "latest" version for many by steveb3210 · · Score: 3, Informative

      Why do organizations target specific versions of browsers - I really don't understand why its so hard for people to write cross-browser web applications - I do it every day at my job..

    6. Re:IE8 = "latest" version for many by Billly+Gates · · Score: 2

      Not the statistics I see on statcounter for the US. China is an outliner that gives a false impression on netmarketshare/appliances etc because they only run pirated software over there. Unless you make Mandrin websites that shouldn't matter.

      Windows 7 in the US and Europe already hit 50% and XP is dying fast. There were barely be double digit marketshare by the end of next year. It is time to move on and start supporting newer standards. Look at this way? The iphone came out in 2007 with css and html 5 support for its apps. That was 5 years ago and we still have these issues because it is so far behind and it is common that we should be implementing css 3 and html 5 and use JIT javascript engines to not leave these users behind, but the corps will make us use IE 8 until 2020 if they can.

      Browsers should be upgraded frequently like Windows Update. If developers stop supporting like they did with 16 bit Win 3.x apps, dos, netscape, the corps move on. If not we still would be using Windows 3.1 with Netscape 4.7 today. Why? It works fine!

      IE 8 in the US already drops down to 11% markethsare on the weekends according to www.gstatcounter.com! It is on its way out and it is time people moved iwth the times.

    7. Re:IE8 = "latest" version for many by dingen · · Score: 2

      Then that feature doesn't work in that browser. Doesn't mean the rest of your web application has to fall apart.

      --
      Pretty good is actually pretty bad.
    8. Re:IE8 = "latest" version for many by marcosdumay · · Score: 3, Insightful

      It's unreasonable to expect the entire industry to stand still because the granny contingent refuses to buy a new pc or tablet.

      Those grannies are paying your salary (well, paying the typical web developer's salary, may not apply personaly to you), are you sure you want them to go away?

    9. Re:IE8 = "latest" version for many by TheCycoONE · · Score: 4, Informative

      The first part of your comment is true, 10 is dropping them. The second part isn't - conditional comments can be written either to exclude or include all browsers that don't support them (with comment syntax or tag syntax). When using comment syntax IE6-9 can execute a piece of code that all other browsers see as a comment.

    10. Re:IE8 = "latest" version for many by tverbeek · · Score: 2

      The question of when Windows XP 1.0 was released is irrelevant, because it was the "current" product for many years after that. The more important landmark is when a replacement (Vista) became available, and more to the point when an attractive replacement (Win7) became available. That's much more recent.

      --
      http://alternatives.rzero.com/
  10. This won't really affect anything. by Kate6 · · Score: 2, Insightful

    "Full API compatibility" means the same identical code should be able to work with the slower-performing version 1.9 on legacy IE browsers *and* with the more optimized version 2 on IE9 and standards compliant browsers.

    All you need is some back-end code to examine the user's browser's "useragent" string and figure out which version of jQuery to serve.

    <?php
    preg_match( '/MSIE ([0-9\.]+)/', $_SERVER[ 'HTTP_USER_AGENT' ], $matches );
    if ( ( count( $matches ) == 2 ) && ( floatval( $matches[ 1 ] ) < 9.0 ) )
         echo "<script type='text/javascript' src='jQuery-1.9.min.js'></script>";
    else
         echo "<script type='text/javascript' src='jQuery-2.0.min.js'></script>";
    ?>

    1. Re:This won't really affect anything. by dingen · · Score: 2

      This is the web we're talking about. Especially with so many people on mobiles these days, bandwidth is limited so size matters. Even is 2.0 offers exactly the same features as 1.9, 2.0 will be a heck of a lot smaller, meaning faster downloading, faster loading, faster parsing. Especially on phones, that's not just a nice thing to have, it's a necessity.

      --
      Pretty good is actually pretty bad.
  11. Dropping IE8 support at this time is unacceptable by JDG1980 · · Score: 2

    I don't have any problem with dropping support for IE6 and IE7. These should have been phased out years ago, and their only reasonable present-day use is not as web browsers, but as legacy applications platforms for badly coded ActiveX apps.

    But IE8? For users with Windows XP, this is as high as you can go. IE9 is not supported. And WinXP continues to be supported by Microsoft through the end of 2014, and is still in very widespread use among businesses, and to a lesser but still significant extent among home users.

    I wish IE8 would go away (or more specifically, that Microsoft would take the time to backport IE9 to WinXP). Its continued persistence means a lot of css3pie hacks in the website I maintain, which are necessary to get rounded corners and drop shadows in this outdated browser. But it won't go away just because Google wants it to. And saying to use Firefox or Chrome instead of IE is not going to fly in most workplaces, which rely heavily on Internet Explorer's integration with Active Directory and its support for Group Policy. As far behind as IE falls in other categories, no third-party browser matches its abilities on these vital business fronts.

  12. Dewey by michaelmalak · · Score: 2

    In the news from 2013: jQuery adopts the Dewey-decimal numbering system for its versions. The next version will be 1.9.3.2.

  13. Legacy Branching? by kiehlster · · Score: 2

    Why don't we manage these APIs in a manner like version controls? Maintain a 'core' branch that's compatible with the latest browsers and then have additional 'legacy' branches that break off whenever a browser version is deprecated. I know your first instinct is to argue, "Just install multiple versions of the API," but why not make the API a repository in and of itself? And for those people who want every ounce of speed out of their API, you can just offer a 'core' version of the API that only supports the latest browsers and doesn't include the legacy branches.

  14. jQuery native support by JDG1980 · · Score: 2

    This is a bit off of the main topic... but any idea why none of the browser vendors have implemented native support for jQuery in their JavaScript engines? It seems to me that this would be an easy way to improve performance, considering how many websites use it, and considering that implementing native support for its API would remove the need to go through 2 layers of interpreters.

  15. Re:Dojo Toolkit by cyber-vandal · · Score: 2

    Yawn. Why is it that nerds who generally hate typing are so hung up on reinventing the wheel all the time just to meet some meaningless code purity standard. You might not have deadlines but I do and anything that speeds my work up is a good thing. Shit code in pure Javascript abounds; JQuery has nothing to do with the quality of the developer.

  16. Re:Dojo Toolkit by steveb3210 · · Score: 2

    Riight..

    Because looking at code littered with var e = document.getElementById('stuff'); is just so much more elegant and non-shit-looking than $('#stuff')..

  17. Re:Dojo Toolkit by colinrichardday · · Score: 2

    And javascript itself isn't a crutch for people who can't be bothered to learn other languages?

  18. Good by diego.viola · · Score: 2

    Good, people need to stop supporting crap if we want the crap to go away.

  19. Bad move jquery by detain · · Score: 2

    You cant run IE9 on older versions of windows can you ? Isnt one of the big reasons people used jquery in the first place was because it works well on most all browsers that are actually used? For any site with a fair amount of traffic you cant afford to just cut out so many of your users. Its true that you will be able to add in of If IE9 load 1.9 otherwise load 2.0 but that seems kinda lame and evnetually theres going to be a larger gap between 1.9 and the current 2.0+ version. I think they should still include support for IE9 and just have it automaticaly handle switchign between the faster and slower code. Either way its way way too early to drop IE8 and maybe even IE6-7

    --
    http://interserver.net/