News for hackers. Stuff that matters.
Re:A love letter to jQuery by bgarbiak on Saturday February 27, 2016 @03:52PM (#11188425)
I would say the landing page is exactly the case where jQuery is not needed anymore. Yes, it's convenient to use, yet for a mostly static page with a few XHR calls, some DOM interactions and whatnot - it's a bloat, actually. 12-16 months ago it would be a sabotage in most cases, but once it's all OK to forget about IE8 - you really can put the good ol' DOM-AJAX-animation JS libraries to rest.

From personal experience: just few days ago I've made a landing page. Focus was on mobile and performance so no jQuery, modernizr, lo-dash, and so on. We only grabbed some syntatic sugar from microjs.com so we could write $(el).remove() instead of el.parentNode.removeChild(el);, etc.

Turned out a nice, little page with all the usual bells and whistles only really needs a 12KB of JavaScript code (uncompressed). We actually missed lo-dash more than jQuery.

In age of "modern browsers'" ubiquity, and Angular/React/Ember/MV* libraries doing the heavier stuff, the support for older IEs is really the last selling point of jQuery. And that goes away soon.

P.S. Very handy: http://youmightnotneedjquery.com/

Re:A love letter to jQuery by ForHackernews on Saturday February 27, 2016 @04:26PM (#11188593)
> it's a bloat, actually.

I mean, it's like less than 30kB minified+gzipped, and if you load it from a CDN, then there's a 95% your users already have it cached.

I guess it's technically a "bloat" but unless all your images are gzipped SVGs, it's almost certainly one of the smaller elements in your page.

Re:A love letter to jQuery by jnbiche on Saturday February 27, 2016 @06:56PM (#11189066)
Unless you're using the unversioned ("latest") jQuery version on your CDN, the browser cache hit rate will be way less than 95%. I've seen some estimates at less than 20% (can't find the link at the moment).

And for various reasons, it's not a terribly good reason to use the "latest" jQuery version with no version, unless you're prepared to deal with sudden code breakage.

Re:A love letter to jQuery by Can_Not on Wednesday March 02, 2016 @07:57PM (#11214322)
> then there's a 95% your users already have it cached.

In reality, there's a less than 5% chance that your users will have the right version cached, but a 95% chance that your users will notice when the public CDN is over capacity.

Re:A love letter to jQuery by KurtMueller on Sunday February 28, 2016 @10:46AM (#11191149)
React isn't really a framework like Angular or Ember. Remember that it's view only - it doesn't handle ajax calls, routing, error handling, async code, etc.