3 ms·
The major criticism of jquery comes from its "overhead" which comes from wrapping a lot of functionalities onto relatively(at the time of its onset) large file[
by niuzeta 10y ago
The major criticism of jquery comes from its "overhead" which comes from wrapping a lot of functionalities onto relatively(at the time of its onset) large file[1]. While they were legitimate(internet was slow) at the time, at its cost jquery worked as a go-to-solution for browser incompatibility. This was a major issue which jquery solved magnificently.
And frankly, a significant portion of jquery usages are a very limited set of functionalities: selection, class manipulation, some visible on/off, AJAX and promises. A lot of those don't necessarily need jquery[2]. Some hard-core guys go so far as to separately download only modules[3] which works.
Honestly, I wouldn't mind calling a significant portion of jquery to be "pure javascript" as it lets me not worry about browser compatibilities and pleasant stuff that should have been part of standard library. ES6 is supposedly fix most of the complaints, but whether browsers will support them or not is a different question.
[1] https://mathiasbynens.be/demo/jquery-size https://mathiasbynens.be/demo/jquery-size has a nice tabular info on how large jquery file sizes were.
[2] http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/ is a widely cited source.
[3] https://github.com/jquery/jquery/tree/master/src https://github.com/jquery/jquery/tree/master/src, go nuts.