Hacker News new | ask | show | jobs
by ZeroGravitas 4081 days ago
JQuery themselves have two versions, one with less browser support which is apparently smaller/faster. So it's weird to say that it's not-JQuery-like.

Though JQuery still recommends the bigger library for most users (unless you're embedding in a mobile app or stuff like that).

2 comments

jQuery 1.x is recommended over 2.x due to lack of IE8 support in the latter. If you don't have IE8 traffic on your site, you can safely go with 2.x (which isn't that much smaller to begin with).
I thought that was true, but checked a few months back and the advice seemed a bit more equivocal than that:

> So, here’s the TL;DR for version 3.0 of the jQuery API:

> * If you need support for the widest variety of browsers including IE8, Opera 12, Safari 5, and the like, use the jQuery-Compat 3.0.0 package. We recommend this version for most web sites, since it provides the best compatibility for all website visitors.

> * If your web site is built only for evergreen leading-edge browsers, or is an HTML-based app contained in a webview (for example PhoneGap or Cordova) where you know which browser engines are in use, go for the jQuery 3.0.0 package.

from http://blog.jquery.com/2014/10/29/jquery-3-0-the-next-genera...

I personally currently need to support IE9 which I wouldn't class as an "evergreen leading-edge browser". I was hoping for a more in depth compatibility chart that named specific versions.

I'd love to have a streamlined but otherwise version of JQuery which I can serve to known modern web browsers. And serve the 'full' version to non-modern browsers.
Sounds like Zepto is pretty close to what you're looking for: http://zeptojs.com/. Otherwise, jQuery 2.x is just jQuery without support for IE 6, 7 and 8. I'm not sure what kind of performance improvements it offers, but it shaves off a few kb.