← Tue, Nov 17 digest

jQuery 4.1.0

read article ↗ hn thread ↗

jQuery 4.1.0 is released, featuring modernizations like replacing legacy DOM methods with querySelectorAll, ReDoS security fixes, and bug workarounds.

summary is enough The release notes detail routine maintenance and bug fixes, while the comment thread offers an engaging retrospective on the library's legacy.

summary

jQuery 4.1.0 updates the long-lived library by swapping legacy element lookup methods for native querySelectorAll, patching a ReDoS vulnerability in identifier matching, and addressing browser quirks. Despite being largely superseded by modern vanilla JavaScript and heavy frameworks, jQuery still powers a massive portion of the web, including WordPress. The project continues to receive updates to maintain stability and security for these legacy systems.

key points

  1. Replaced legacy getElementsByTagName and getElementsByClassName calls with querySelectorAll.
  2. Patched a Regular Expression Denial of Service (ReDoS) vulnerability in identifier matching.
  3. Refactored internal loops to avoid going out of array bounds and added Safari regex workarounds.

who should read it

Web developers maintaining legacy codebases and engineers interested in JavaScript ecosystem history.

discussion positive

consensus

Commenters express pleasant surprise that jQuery is still actively maintained, reminiscing about how it rescued developers from the nightmare of cross-browser inconsistencies in the Internet Explorer era.

pushback

Some argue that jQuery is entirely obsolete today given modern vanilla JS, native CSS features, and component-based frameworks.

best comment by CM30 ↗

I'm a tad surprised jQuery still exists, though it's kinda neat it does. Always interesting to see historical projects with less and less modern day relevance get continued like this.

And while most of the use cases for jQuery have long since died out with things like classList, querySelector, etc, I do feel there's probably value in a framework that focuses on minor enhancements to a site rather than being the backbone of the whole thing. Like if you want a React or Angular or Vue equivalent, something like jQuery would be a terrible choice, but a lot of sites are static ones where the only …

It argues that a lean library like jQuery still holds value for simple static sites needing minor enhancements without the overhead of heavy frameworks.

Generated by an LLM from the article and thread. Check the sources before relying on it.