DEV Community

[Comment from a deleted post]
Collapse
 
thatjoemoore profile image
Joseph Moore • Edited

I started Web programming just as jQuery was coming onto the scene, and it was truly a godsend. Browsers can't agree on how to do simple things? jQuery! XMLHTTPRequest is ridiculously hard to remember? jQuery! Want to distribute standalone, reusable UI components? jQuery UI!

But then, after years of jQuery goodness, I dropped it. What happened? Well, my workplace dropped support for older browsers (< IE 10), and all of a sudden, I could accomplish everything without worrying about the overhead that comes with every additional dependency.

I admit, I'm a performance nut. People have accused me of being too obsessed with web performance, which I think is ridiculous. But, the fact is, I can now get everything I liked about jQuery for free from the browser:

Element.querySelector instead of $()
fetch() instead of $.ajax()
Element.classList.add()/remove()/toggle()
Web Components (WIP) instead of jQuery UI (plus a multitude of newer, simpler component models, like React or Vue)

I will forever be grateful for what jQuery gave us, and for the badly-needed push it gave browsers to get better. There's a reason why we have a lot of nice things in browsers today, and that's jQuery. However, all things must end, and, unless you have to support very old browsers, I personally don't see the need to use it anymore. Yeah, the browser versions of the APIs may be weird, but they're also free. No extra script to load, implementations in browserspace/C++ instead of JS, etc.

For someone as obsessed as I am with every byte transmitted and every millisecond spent parsing JS, browsers implementing things that used to be in JS are a new godsend.

Collapse
 
belhassen07 profile image
Belhassen Chelbi

I totally agree, I'm also grateful for jQuery making my life easier at a certain point, but As I gave my reasons, it's the time to stop using it.
Thanks for sharing this detailed comment Joseph.

Collapse
 
twwilliams profile image
Tommy Williams

I still feel the pain of IE11 and have to support it on our sites at work. I can't use fetch() at all, Element.classList() has all sorts of limitations, and I need a bunch of polyfills for IE11 and Edge if I were ever to use Web Components.

As a result, jQuery is still alive and well for us.