jQuery 4.1.0 github.com · 157 points · 66 comments · HN thread TL;DR jQuery 4.1....
HN Best 200 @best
jQuery 4.1.0 github.com · 157 points · 66 comments · HN thread
TL;DR jQuery 4.1.0 was released alongside 3.8.0, with changes that include a responseURL field on jqXHR, dropping getElementsByTagName/ClassName in favor of querySelectorAll, several selector fixes including a ReDoS fix, and a Safari 27 workaround. The HN thread (157 points, 66 comments) is mostly nostalgic and debates whether jQuery still matters, with many noting it remains widely deployed through WordPress and legacy sites.
- Release notes list changes across Ajax, Core, CSS, Selector, Data, Docs and Tests; 4.1.0 ships together with jQuery 3.8.0 as a 'passing the torch' release per the linked blog post.
- Ajax adds a responseURL field to jqXHR and an alternative completeCallback API for transports.
- Core drops getElementsByTagName/getElementsByClassName in favor of querySelectorAll.
- Selector work includes a ReDoS fix in identifier matching, a fix to the runescape regex in unescapeSelector, and a Safari 27 regex interpreter workaround.
- Docs add TuxCare as a commercial support vendor and new guidelines for machine-generated contributions.
- Commenters cite w3techs figures that jQuery is on roughly 63% of websites, with WordPress bundling it by default.
Discussion The thread is largely reflective and good-natured, treating the release as a surprise that the project is still maintained. Commenters trade stories about jQuery's past dominance, its fluent method-chaining design, and its role in older sites, while others argue modern browsers and tools like querySelector, CSS Grid/Flex and AI-written code have made it largely unnecessary. Side threads cover jQuery UI, MooTools and Prototype, and an off-topic tangent on Tolkien's Elrond.
- jQuery is obsolete; native JS and modern CSS cover its uses (many): Commenters point out that querySelector, classList, map/filter and Flex/Grid replaced most jQuery functionality. Several say GitHub and others already moved off it, and that vanilla JS is now sufficient.
- jQuery still has real value for small sites and legacy code (many): Many argue it suits minor enhancements on static sites, and that legacy monoliths and WordPress themes make it hard to remove. Some say its compact syntax is still more readable than DOM APIs.
- Chaining and collection wrappers are still a strength (some): Several commenters praise the fluent interface and jQuery collections, which operate on many elements at once and are nicer than NodeList. They note this was uncommon when jQuery launched.
- jQuery's silent no-op on empty sets is a drawback (a few): One commenter wants errors on empty selections to catch bugs, and suggests writing a custom plugin to get that behavior.
- Still-supported IE11 is a notable holdover (a few): Commenters note jQuery still avoids dropping IE11, a browser retired in 2022 and disabled in 2023, which some find odd given its small user base.
- Nostalgia for jQuery and earlier web era (some): Many replies are fond memories of jQuery, MooTools and Prototype, and of the early web, including building pseudo-React systems on jQuery in IE7.
Links from the comments
- W3Techs usage statistics showing jQuery on about 63% of websites.
- DataTables 3 announcement noting it dropped the jQuery dependency.
- Site showing vanilla JS equivalents of jQuery methods.
- Hyperscript, suggested as an alternative for small interactivity needs.
- TC39 pipeline operator proposal, mentioned as a language-level fluent style.
#jquery #javascript #frontend #webDevelopment #legacyCode #releaseNotes