Why would you use a fetch get request instead of a jquery Get Request?

Fetch is a new way of doing requests. You can see which browsers support it on this very useful website: https://caniuse.com/#search=fetch

The old way is doing by using XMLHttpRequest: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest

The old way is safer, because older browser versions still use it.

jQuery’s $.ajax request is just a wrapper of javascript’s XMLHttpRequest.

1 Like