It adds tens of milliseconds to just downloading on a fast connection, plus it has to be parsed before what ever you need it to do will be functional.
To compare, just roughly:
For roughly the same size you can get declarative/reactive rendering with React, or an optimized FP standard library with ClojureScript, or data driven visualizations with d3 (roughly 2x the size).
For a tenth of the size you can get stuff like htmx, or a json validation library (avj), or like someone said Preact (React alternative).
But for jQuery, you're paying that for basically nothing the browser APIs don't already provide. It was a godsend 10y ago, but with legacy browsers finally fading out, the last one being ie11, you really don't _need_ it anymore.
Re:Gov.uk drops jQuery from their front end
by Rumudiez on Thursday May 19, 2022 @10:41AM
(#31435280)
30kb gzipped is still 10x larger than Preact for reference
Re:Gov.uk drops jQuery from their front end
by SemanticStrengh on Thursday May 19, 2022 @11:12AM
(#31435747)
that doesn't make it an issue in any way, it's not a numbers competition unless you have a 56K
Re:Gov.uk drops jQuery from their front end
by Smaug123 on Thursday May 19, 2022 @02:34PM
(#31438361)
One of the explicit goals of gov.uk is to be maximally accessible, and that includes for people accessing the Internet on a potato or who have a metered connection.
Re:Gov.uk drops jQuery from their front end
by lowwave on Thursday May 19, 2022 @10:53AM
(#31435448)
or use https://axios-http.com/ for ajax stuff
I think if you strip out the AJAX support it can get extremely tiny.