4 ms·
I'm with you on fetch() requests not being able to be aborted, but I didn't think there were any other reasons to use XMLHttpRequest over fetch in 2022. I've be
by simonw 4y ago
I'm with you on fetch() requests not being able to be aborted, but I didn't think there were any other reasons to use XMLHttpRequest over fetch in 2022. I've been fetch() only for a few years as this point - what older browsers are you targeting that don't support fetch()?
- diamondo25 4y agoAnd even then, there are probably fetch() implementations around xmlhttprequest
- codedokode 4y agoInternet Explorer and older browsers support is important too. You must support browsers released within last 10 years and fetch is too new and experimental for this. I don't want to use something just because it is new and has no clear advantages over older technology.
- simonw 4y agoMicrosoft dropped support for IE in June 2022. https://caniuse.com/fetch 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 https://github.com/github/fetch
- dsego 4y agofetch doesn't support upload progress https://javascript.info/fetch-progress https://javascript.info/fetch-progress > Please note: there’s currently no way for fetch to track upload progress. For that purpose, please use XMLHttpRequest, we’ll cover it later. coming soon (2020) https://ilikekillnerds.com/2020/09/file-upload-progress-with-the-fetch-api-is-coming/ https://ilikekillnerds.com/2020/09/file-upload-progress-with...