DEV Community

Discussion on: You Don’t Need jQuery

Collapse
 
prahladyeri profile image
Prahlad Yeri • Edited

in order to use jQuery you need to add an external javascript file like jquery.min.js which is of 30 kb size gzipped which will result in a 7 millisecond delay

That I think is the epitome of exaggeration! People don't seem to have any qualms about linking megabytes of bloat for "modern" things like vue, angular2, react, etc. for even announcement sites, and 30kb is suddenly a huge deal? If anything, this reflects nothing but people's prejudice towards jQuery.

Collapse
 
kdinnypaul profile image
Dinny Paul • Edited

It's not exaggeration have you read about render blocking javascript here's a link RenderBlockingJS

The problem is your js code can run only after your jquery is loaded and that is a huge disadvantage

In this article I'm comparing jQuery and pure javascript so that is disadvantage over pure javascript code which doesn't require an external js file besides the point the main reason why jQuery is bloated is to give support to old browsers which most ppl don't use anymore that's why I also suggested jQuery alternatives in this article

Now I didn't even mention about the external css required by Jquery in this article if you are going to display dialogs and other UI related stuff which slows your page even more

BTW I learned jQuery even before pure javascript and I wasted a lot of time in replacing jQuery I just want other developers to avoid it completely because time's have changed and with attention spans reducing more than ever even a second delay can have a huge impact on user experience

Collapse
 
jjlabajo profile image
JJ Labajo

I agree. And I feel the exaggeration, too, while reading.