
JQuery 2.0 Released - Encosia
http://blog.jquery.com/2013/04/18/jquery-2-0-released/
======
JoeCortopassi
I think what a lot of people are upset about here, is jQuery entered the web
development scene as "the library that solved cross-browser compatibility
issues". Now while IE 6 is an obvious one to drop, IE 7 is a little tougher,
and IE 8 is down right impossible to drop at this time. I understand that
jQuery wants to promote a modern framework, but people didn't adopt it for
it's fancy features. They adopted it because those fancy features worked the
same in every major browser .

The stop gap solution of 1.9 as being parallel to 2.0 but with compatibility,
is understandable, but will probably promote distrust in developers who just
need a stable cross-platform solution. I think the immediate concern with 1.9,
is how long it will continue in parallel with 2.x before being dropped

~~~
dmethvin
Sorry if I seem cranky, but did you READ the blog post? jQuery 1.9 supports
those browsers and the jQuery team still supports it. Do you have a problem
with us supporting a second version that can be smaller, faster, and work in
places other than obsolete browsers?

~~~
tambourine_man
I do.

 _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._

Dropping IE 6, 7 and 8 support for a 12% smaller file size while effectively
forking your code base for the foreseeable future is a lousy decision.
Increase complexity tremendously for what, 3-4 KB when gzipped?

~~~
reeses
Actually, it's decreasing complexity and getting a happy side effect of a 12%
smaller file. It was probably a mistake to add the file size difference as a
benefit, as it has obviously confused a lot of people who appear to have
perceived it as a primary design goal.

~~~
tracker1
I'll say the size drop is the primary reason I'm going through having the
browser tags for ie lt 9, vs other... even though 3-4K isn't much, that's
quite a few packets on mobile (though there is Zepto, it's nowhere near
complete enough for a lot of needs).

I'm working on some revamped UI at the moment, and so far the script load
(uglified, not gzipped) is around 250K, anything that can get that down imho
is a good thing.

------
DigitalSea
This is a welcome change. Considering the market share of IE 6, 7 and 8 is
pretty minuscule and Google dropping support for IE8 back in November 2012
should be cause enough to drop it from jQuery too. It's great to hear they'll
be supporting the older 1.9 branch for users who need to support older
versions of IE as not everyone has the luxury of being able to ditch older
versions of IE like that. There's no cause for concern here, the jQuery team
covered their bases well and lets face it, there aren't many open source
projects out there that drop support for older versions of something like a
browser and then commit to continue to support an older branch for a lengthy
amount of time.

~~~
hobbes78
Is 31.37% pretty minuscule? I don't think so...

Source: <http://www.netmarketshare.com/>

~~~
ricardobeat
Statcounter[1] puts IE8 at ~10%, 12% for the US[2]. In some markets it's even
lower[3]. This matches what I see from non-tech client websites. For anything
related to software, IE as a whole is close to zero.

StatCounter tracks 3 million websites vs 40k for NetMarketShare.

[1] <http://gs.statcounter.com/>

[2]
[http://gs.statcounter.com/#browser_version_partially_combine...](http://gs.statcounter.com/#browser_version_partially_combined-
US-monthly-201203-201303)

[3]
[http://gs.statcounter.com/#browser_version_partially_combine...](http://gs.statcounter.com/#browser_version_partially_combined-
BR-monthly-201203-201303)

------
colemorrison
So I find that the majority of people are missing a very LARGE improvement
that I value far beyond any of the stated benefits by the jQuery team:

-One of the most popular libraries is dropping support for IE 6,7, and 8. Thus, yet another cornerstone of the web is going to push users forward and increase the chance that those miserable browsers will disappear.

The most disturbing thing I find is that there are developers that are
DEFENDING existence for those older browsers. Are you masochists? Do you enjoy
the headaches of fucking around with those??

"Oh but so many clients are still using them, and it writes off potential
users!"

How can we ever expect for them to upgrade their damn browser unless the
builders the web (developers, not just browsers) quit allowing them to rot in
complacency????

Of course, there is a thing as going "too leading edge" and expecting "too
much" from the user...but when the cornerstones (libs, browsers, etc) start
pushing them forward - then we should embrace this change. Coding for the
multi-browser/platform/device/version web is hard enough.

~~~
theycallmemorty
The main problem I see is that IE9 does not work on windows XP. How long will
we continue to see Windows XP machines in the wild?

~~~
acdha
Microsoft will not be doing it past 2014. I wouldn't care more about their OS
than they do, particularly given the extreme security risks.

------
darkandbrooding
I've read through the 100+ comments that preceded me, and I must be missing
something stupidly obvious. Thanks in advance to anyone who can enlighten me.

Can't you just host your own copy of JQuery? If your web app needs version
x.y.whatever, is there some reason why you can't just host your own copy of
the library on the same servers the provide the rest of your web content?

I understand the convenience of using some CDN's copy of JQuery, but I'm
unsure why it's anything other than a convenience. Maybe it's about money:
"It'll cost us an extra $X per month in bandwidth fees to host our own version
of JQuery." Maybe it's about user experience: "By hosting JQuery on our own
site we add 100ms to page load times."

To the people who seem most unhappy about the version bump, can you describe
how hosting your own version of JQuery would complicate your lives? Just so
there is no ambiguity, I'm asking from a point of ignorance, not snark. I
would genuinely like to read the answers.

~~~
crazygringo
There is zero problem with hosting your own copy. Lots of people do.

The main advantage to using a CDN is that a single copy can be cached across
multiple websites, meaning that the first time someone visits your site,
there's a good chance your version of jQuery already sits on their computer.
Plus, the Google CDN will often serve content faster than your own site. And,
since jQuery is now so "integral" to websites, it almost seems silly to have
to maintain a copy of it yourself.

But the main downside to using a CDN is that, CDN's have gone down before, and
that means your site will stop working. Obviously, it doesn't happen often,
but it happened once to a widely used site of a friend of mine, and he swore,
never again will he reference jQuery on a CDN. I personally prefer to host
myself too. (But not out of bandwidth savings, that just winds up being
trivial.)

~~~
Dave9k
You can use a CDN and fallback to local if it goes down.

[http://stackoverflow.com/questions/5257923/how-to-load-
local...](http://stackoverflow.com/questions/5257923/how-to-load-local-script-
files-as-fallback-in-cases-where-cdn-are-blocked-unavai)

~~~
crazygringo
I would be wary of that -- I assume it's likely that a CDN would often time
out in case of error, which means you might be looking at 30 or 60 seconds
until JavaScript works on your page.

------
apendleton
The addition of the ability to just use querySelectorAll as the selector
engine and not ship Sizzle is a pretty big deal, and not something I remember
being included in earlier discussions about jQuery 2. qSA still includes a
pretty broad set of selectors, and the ability to get the build down to 10k
minified and gzipped puts it squarely in Zepto's territory, size-wise,
eliminating the need for that particular wheel reinvention.

~~~
KaoruAoiShiho
Is there a list of features of what sizzle does over qSA

~~~
dmethvin
Posted elsewhere, but
[https://github.com/jquery/jquery/blob/master/src/selector-
na...](https://github.com/jquery/jquery/blob/master/src/selector-native.js#L4)

------
rurounijones
I am not too troubled by the drop of support of IE 6/7/8.

As long as they continue to support IE8 in 1.9 until Windows XP EOL next year
I don't really see a problem.

Asking jQuery to support those browsers longer than Microsoft itself is
willing do seems a bit harsh.

~~~
reustle
> Asking jQuery to support those browsers longer than Microsoft itself is
> willing do seems a bit harsh.

While I agree with jQuery's decision here, this isn't really fair right?
Windows XP and most old stand-alone software they have installed will continue
to work after MS drops support.

When we're talking about the web, a reasonable effort should be made to
support those legacy users. Of course, you can only do so much, but according
to the general consensus in these comments, that's around 10% of visitors.
Whether or not dropping them is worth saving the 12% in code size, is a
different question.

------
oneeyedpigeon
I cannot believe IE8 is now considered 'old'. It is the second most used
browser+version on our site, and has about 80% as much usage as the leader,
IE9. Can't see IE8 support being droppable for many years yet.

~~~
ahoge
Even IE9 is pretty old. It's over 2 years old by now. IE8 is over 4 years old.

IE11 will be released soon. How many versions of IE do you intend to support?

~~~
igravious
As many versions as used by the audience that they serve I suppose; how is the
choice up to him?

~~~
jhack
At the speed web development is moving, I don't see much sense in coddling
browsers that are more than 2-3 years old.

~~~
dave5104
It all depends on your end goals and your audience. I don't have #'s off the
top of my head, but let's say IE8 accounted for 40% of browser usage across
your visitors. But IE8 is old. Are you willing to say to 40% of your
potentially paying customers "Sorry, but your browser sucks. We're not
supporting you."?

If you are, great. No coddling necessary. But for other people, they may not
be comfortable with the percentages yet, and I think that's perfectly
understandable.

~~~
nbouscal
You wouldn't say it like that, I hope. You would say, “Here's a link to a
browser upgrade that will allow you to enjoy the best product we can offer
you. It's completely free, and takes only a few minutes to install!” Also, IE8
accounts for less than 10% of browser usage worldwide now, so the odds of a
company having it be 40% are rather slim, unless they specifically target
enterprise in which case they dug their own grave and I have no sympathy for
them.

~~~
dave5104
Oh no, of course not. I'm just trying to make the point that some companies
may not be comfortable with whatever IE8 is at right now. I think you can
substitute "IE8" for any browser, and "40%" for whatever that browser's
current market share is.

Coincidentally, I work in the multi-family housing industry, and one of the
industry titans requires IE to use their product--which everyone uses--so we
have ~82% IE share on our own product (which is supplementary to the titan).
Of that, IE8 stands at ~31% of our total site traffic, which is compelling
enough for our company to need to support it. (IE9 is only ~39%, with IE6/7/10
making up the remaining 12%.)

So until that industry titan changes their way, we're stuck in an IE rut.

~~~
nbouscal
That's a shitty situation to be in. Sounds like a great opportunity for
someone to disrupt that industry titan, though.

~~~
nasmorn
Some businesses have deeper moats than front end dev speed.

~~~
dave5104
This is exactly right for multi-family housing. I can't see any sort of
startup or disruption coming in anytime soon without taking years of hard work
to reach 50% feature parity to meet what the industry expects are standard
features. (Or maybe I've been working here too long to get past that notion.)

------
DivisibleByZero
I was just debating the merits of going with one of the lightweight jquery
substitutions for a phonegap app. This couldn't come at a better time.

Dropping the cruft and supporting 1.9 is such a wonderful way to go.
Congratulations on a great release jquery team.

------
laurent123456
> If you want, you can serve 2.0 to newer browsers and 1.9 to older ones using
> our conditional comment trick

I'm really surprised they would suggest doing this. The two APIs are quite
different since many functions from the 1.x branch have been removed in the
2.x or sometime behave differently (for instance `$("some
<strong>bold</strong> text")` will be parsed as HTML in 1.x but considered a
CSS selector in 2.x).

Basically, I really wonder what could be the benefit of using this kind of
conditional comment trick.

~~~
Skalman
It'll be parsed as HTML in 1.8, but it's a CSS selector in 1.9.

------
Zangrief
The point of separation is simpler jQuery development and reduced file-size
for the >= 2.x versions. You will serve two files. You serve 1.9.x to IE 6/7/8
users, and 2.x to everyone else. You save bandwidth. You save money.

Features will be the same. It's OSS folks. It's not like it's ran by a closed-
source team at Google who may suddenly pull the plug if it deems the project
unpopular. My guess is folks who work in enterprise (where older IE still
plagues) will be the big maintainers of 1.9.x.

------
igravious
Serious question. Please hit me with a clue stick.

Regarding 1.9, how can "old-IE compatibility often causes problems of its own"
and "simplest way to support older browsers is to use jQuery 1.x on your site,
since it works for all browsers." both be true at one and the same time?

~~~
themgt
This is one of the biggest projects on the web leading the way in throwing
shitty old IE under the bus to help push the modern web forward.

They're going to keep big-fixing 1.X so people stuck with IE6/7/8 can keep
supporting it, but moving forward with 2.x for modern browsers makes their
lives easier in the long run, and provides yet another coffin nail in
Microsoft's attempt decade-old attempt to break the web.

~~~
stef25
They're not so much throwing IE under the bus as throwing developers under the
bus that have fortune-500 clients that can only use IE. Some nerd (me) whining
about their browser choice is really not going to make their IT director
change policies.

Granted, I can and will keep using 1.9

~~~
josteink
Make that Fortune 500s which when jQuery 2.0 is released next year needs to be
running a OS which is EOLed by Microsoft with _no support or security patches_
to be affected.

IOW: Cry me a river.

People made these exact arguments that people "require XP and MSIE8" and that
they "can't upgrade" years ago, when Vista was released, then when Windows 7
was released and now with Windows 8's release.

Here's news for you: You've had 2 or 3 advance warnings from Microsoft that
your IT platform will be obsoleted and unsupported and 2 non-ordinary support-
extensions. You've had more than half a decade to plan and execute the
migration.

If you haven't completed that migration yet and are still whining, you are
_incompetent_ as an IT manager. There is no other way to describe this. If you
are still running XP, that is because of incompetence. No excuses.

XP is older than the very first release of Ubuntu. Microsoft has supported XP
for longer than Ubuntu's entire existance. As a basis for comparison any
version of Ubuntu is supported for 2 years and that's it. XP has been around
for 12 years now, and will be supported for yet another year before support is
finally dropped. Sometimes enough is enough.

This is a good move by jQuery to streamline their code-base. Sometimes you
need to do the spring-cleaning if you want your code to be manageable and have
any chance of effectively improving your product, and this is just that
spring-cleaning.

~~~
democracy
You do realize that jQuery is not going to change any of that?

------
dave1010uk
Now we can say "but even the latest version jQuery doesn't support IE 8!"
(even though the supported 1.9 branch still does).

------
felixthehat
I wish Microsoft would shoehorn at least IE9 into XP, maybe like Chrome Frame.

It's crazy how many people are still stuck with XP/IE8 which is a massive web
dev headache.

~~~
ancarda
I'm annoyed XP doesn't have IE 9 or DirectX 10+, but I guess that's
Microsoft's way of getting people to upgrade to newer versions of Windows.

Based on current stats, I'd say IE 8 hasn't got long till you can ignore it
but it really depends on how much market share you care about. Do people STILL
target IE 6? IE 8 is on ~10%[1] and at the current rate it's dropping at
should be at 5% by October - Just in time for IE 11?

As for blaming XP, I'm not sure you can completely. IE 8 is the default
browser of Windows 7 and XP has more than double the market share of IE 6/7/8
combined. Most IE users seem to be schools and companies that haven't
upgraded. Although IE 6 will definitely be gone by April 2014, we could very
well be stuck with IE 8 for a very long time.

For the record, IE 6 and 7 should be ignored completely. Combined they have a
market share of less than 1%.

For a rule of thumb, I commonly drop support once a browser crosses 5%. Might
seem high but usually once it's at that level, it's only going to keep
falling.

Something to look forward to, my estimates[2] put Firefox 3.6, Safari 5/5.1
and IE 6/7/9 to all be gone by the start of 2014. Of course, linear
estimations should always be taken with a grain of salt.

[1]
[http://gs.statcounter.com/#browser_version_partially_combine...](http://gs.statcounter.com/#browser_version_partially_combined-
ww-monthly-201203-201303)

[2] <http://cl.ly/image/2d1G3Y1Q2m3k>

~~~
tghw
Speaking of old software, Windows XP is nearly a dozen years old.

------
sturmeh
Until Windows XP is banished from corporate machines worldwide, I don't think
we can drop IE8 support. (You can't install 9/10 on Windows XP.)

I'm glad they decided to continue support for 1.x for now.

------
verisimilitude
Am I the only one who can not use Closure Compiler with jquery 2.0.0? (
<http://closure-compiler.appspot.com/> )

~~~
Skalman
Yeah, it gives me 29 errors. You might as well use UglifyJS, the same
compressor that jQuery uses. <https://github.com/mishoo/UglifyJS2/>

You can try it out on <http://skalman.github.io/UglifyJS-online/>. It's just a
light-weight wrapper.

------
da_n
Well done jQuery team, nice work. Wether I can use it production before April
8, 2014 is going to be debatable. I dearly would love to delete the XP VM
running IE8 however.

------
davis_m
I don't understand why the smaller file size is such a big deal. The file is
going to be cached, and with the use of CDNs, is more than likely already
cached before the client ever visits my website.

So if the Query team is still going to support these browsers in 1.9, why even
make the 2.0 version?

~~~
Perceptes
File size is not only a concern in terms of download time. There's also parse
time, and the amount of extra memory used to consider.

------
ConceitedCode
The "How 2.0 Changed" section only lists dropping support for IE 6/7/8 and
reduced file size (from dropping the IE support?). Are there any other note
worthy/major changes or just minor bug fixes and the like?

~~~
apendleton
No, the idea has pretty much always been that jQuery 1.9 and 2.0 would be
feature-comparable, just with different sizes and supported browsers. See
[http://blog.jquery.com/2012/06/28/jquery-core-
version-1-9-an...](http://blog.jquery.com/2012/06/28/jquery-core-
version-1-9-and-beyond/)

~~~
as_if
They hate IE SO much, they even made the drop a new major release.

This is what I call commitment.

~~~
dmethvin
Since people see jQuery as a solution for cross-browser issues, dropping some
browser support is the biggest change imaginable.

~~~
jjs
Deprecating old-IE _is_ the solution for cross-browser issues.

------
leeoniya
it would be nice to see a 2.0 vs 1.9 bench on FF/Chrome/IE9+, much more
interested in that than a non-noticeable 11k size reduction for the end user
(maybe only slightly noticeable on very slow mobile).

~~~
monkeynotes
Yeah, I was also scratching my head as to the 'performance' gains. Even if
jQuery 2.0 has computational benchmark gains they also are likely
insignificant in proper context.

~~~
byroot
I found this one: <http://jsperf.com/jquery-1-7-2-vs-jquery-1-8/29>

2.0 is slightly faster on every measures.

------
gesman
No more support for IE 6/7/8. Yay!

~~~
marcosdumay
Gone, with half of the compressed file size.

Lots of people will serve the two versions.

------
silasb
Anyone know if the jQuery 2.0 fixes/enhancements will also be applied to the
1.x branch, particular the 1.9 series. Based on what I've read they are
running in parallel with the IE stuff removed. I can't seem to find anything
that mentions that 1.x stuff has been updated and released.

------
EGreg
It would be nice if jQuery made builds for every browser, so savvier
developers who can write server-side code can actually spit out only the
relevant jQuery to the relevant browser. I mean, it's not like caching files
at the ISP level is the limiting factor here, so each browser can cache its
own file.

------
jrochkind1
One thing that confuses me:

If the JQuery team is committed to keep supporting 1.9/1.x, entirely API-
compatible with 2.0 -- what is the benefit to JQuery of the 1.x/2.x fork? You
get a cleaner easier to maintain codebase in 2.x -- but you've got to keep
maintaining 1.x anyway. If there was a feature you didn't want to add to 1.x
because it was too hard -- you still can't add it to 2.x and not 1.x, because
you committed to supporting 1.x as API-compatible, no?

Is the idea that 2.x will provide better performance on capable browsers than
1.x? So, yeah, the development burden is no less, but the results are better.

I guess I understand why people are doubting whether they will really follow
through -- because if they do follow through, it makes it somewhat unclear
what the benefit of the 2.x refactor was in the first place.

------
drorweiss
Will jquery still work with jsdom on node.js? the 2.0 or 1.9 jquery?

