replace jquery from the front end

briansol

Well-known member
jQuery is obsolete in many ways and adds much page bloat.
cross-browser support issues are not what they used to be rendering it less important.

leveraging vanilla js for most basic functions, or switching to react or angular component-based template would be a great addition to the software in a future overhaul, perhaps 3.0
 
Upvote 7

Kirby

Well-known member
jQuery definitly does add weight and contains a lot of code not needed for modern browsers.
Though I don't think it can/will be removed any time soon as a lot of 3rd party components being used (light lightGallery, lightSlider, at.js, stickkit, rangyinputs, etc.) depend on it.

That being said, I think there is room for improvement:
core.js for example does contain a lot of code that is not necessary on initial page load (like hadling AJAX, overlays, messages, autocomplete, jobs, keep-alive, link proxy, bbode expand, etc.) or not necessary for guests at all (handling ignored content, push notifications, etc.)

It might make sense to reorganize this so that code which is not immediately required is loaded after the load event has fired and to not unconditionally load code that is only ever required for registered users.

This would slightly increase the number of requests, but decrease the time initially required to parse and execute JavaScript, probably leading to better web vitals (FID, LCP).
 
Last edited:
Top