News for hackers. Stuff that matters.
Re:You might not need JavaScript by G3E9 on Wednesday October 12, 2016 @03:37PM (#12695844)
Or when a project includes jQuery for a single AJAX call - someone somewhere got paid for that ridiculous insight.
Re:You might not need JavaScript by matchagaucho on Wednesday October 12, 2016 @04:57PM (#12696357)
Given "fetch" is not yet a standard, jQuery $.ajax is actually a decent cross-browser polyfill.
Re:You might not need JavaScript by favorited on Wednesday October 12, 2016 @05:21PM (#12696512)
I've been out of the JS world for a few years, but for a single Ajax call, why wouldn't you use XMLHttpRequest?
Re:You might not need JavaScript by matchagaucho on Thursday October 13, 2016 @01:05PM (#12702257)
jQuery 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.

Re:You might not need JavaScript by truth_sentinell on Wednesday October 12, 2016 @05:43PM (#12696640)
Why would you care about IE8 - 9 or whatever other browser you might be thinking about that has probably an infinitesimal market share?
Re:You might not need JavaScript by Whitestrake on Thursday October 13, 2016 @12:37AM (#12698456)
Market 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.

Re:You might not need JavaScript by bildung on Friday October 14, 2016 @05:38AM (#12706992)
Because 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.