4 ms·
Or when a project includes jQuery for a single AJAX call - someone somewhere got paid for that ridiculous insight.
by G3E9 10y ago
Or when a project includes jQuery for a single AJAX call - someone somewhere got paid for that ridiculous insight.
- matchagaucho 10y agoGiven "fetch" is not yet a standard, jQuery $.ajax is actually a decent cross-browser polyfill.
- favorited 10y agoI've been out of the JS world for a few years, but for a single Ajax call, why wouldn't you use XMLHttpRequest?
- matchagaucho 10y agojQuery ajax essentially is just a wrapper to XMLHttpRequest. With some effort, the relevant jQuery methods that act as polyfills could be extracted. However, a minified version of core jQuery is < 20Kb. A very low technical debt trade-off to support 99% of browsers.
- truth_sentinell 10y agoWhy would you care about IE8 - 9 or whatever other browser you might be thinking about that has probably an infinitesimal market share?
- Whitestrake 10y agoMarket share might be a ridiculously small percentage overall, but it's never appropriate to dismiss compatibility outright. Reasons to include inefficient code for compatibility reasons might include applications where maximum reach is valuable, or where the scale is so large that the "infinitesimal market share" percentage plays out into thousands of end users.
- bildung 10y agoBecause market share is only meaningful if you target consumers. If you write (internal or niche) web applications for e.g. schools, large companies, non-profits etc. legacy browsers can easily be > 30% of your targets.