What does HackerNews think of fetch?

A window.fetch JavaScript polyfill.

Language: JavaScript

#16 in JavaScript
You can polyfill fetch() if that's a concern:

https://github.com/github/fetch

Microsoft dropped support for IE in June 2022. https://caniuse.com/fetch shows that fetch() is now at 96.99% support for global users.

If you still need to support old IE you can use a library like https://github.com/github/fetch

I suppose. Or just use a polyfill for old browsers. It increases your code size a little, but at least the bloat is temporary.

https://github.com/github/fetch or https://www.npmjs.com/package/fetch-ie8

https://github.com/mzabriskie/axios

https://github.com/github/fetch

Among countless others. Please don't bring in all of jQuery if you're just going to use one function from it.

+1 for fetch. Use the good github fetch polyfill for old browsers https://github.com/github/fetch
Fetch is great and there's a tiny polyfill from GitHub to patch IE and Safari https://github.com/github/fetch
It's probably a good time to start looking at using the Fetch API [1] for making AJAX requests instead of using jQuery or Backbone (or even XMLHttpRequest). Support seems to be growing quickly and Github's polyfill [2] can help cover the gaps.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [2] https://github.com/github/fetch

You can polyfill it in those browsers. Just use polyfill.io, or if you prefer, manually feature-detect it and if necessary load Github's fetch polyfill, which is good: https://github.com/github/fetch
You should look at `fetch` which is the new specification for a promise based XHR wrapper.

Polyfill: https://github.com/github/fetch

To use Fetch in Firefox (38), you'll currently need to enable it — go to about:config, set dom.fetch.enabled to true, and restart the browser. To use Fetch in Chrome 41/Opera 28, you need to enable the "Experimental Web Platform Features" pref in chrome://flags.

I've used github/fetch [1] which is a polyfill for the upcoming fetch standard [2]. If you ever want to go beyond this its one of state sources in marty.js [3]

[1] https://github.com/github/fetch [2] https://fetch.spec.whatwg.org/ [3] http://martyjs.org/guides/state-sources/http.html