Generally speaking, we only turn XHR (XMLHttpRequest) requests into ajax.
But when fetch was released, we generally called xhr-based network requests traditional ajax to distinguish fetch (fetch is not based on xhr).
Let’s look at the description of fetch:
The Fetch API provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses. It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
The meaning behind is: Asynchronously obtain resources across the network.
Maybe there will be no such thing as ajax in the future. After all, there is no x in ajax.
Ajax does not require any browser plug-ins, but requires the user to allow JavaScript to execute on the browser.
So it’s not called ajax
mdn also specifically pointed out that the most important thing in jax is the XMLHttpRequest object
Asynchronous JavaScript + XML, while not a technology in itself, is a term coined in 2005 by Jesse James Garrett, that describes a "new" approach to using a number of existing technologies together, including: HTML or XHTML, Cascading Style Sheets , JavaScript, The Document Object Model, XML, XSLT, and most importantly the XMLHttpRequest object.
It also shows that it is not considered ajax in other environments. This should be just an ordinary http request, similar to a browser making a request to access a website.
Generally speaking, we only turn XHR (XMLHttpRequest) requests into ajax.
But when fetch was released, we generally called xhr-based network requests traditional ajax to distinguish fetch (fetch is not based on
xhr).
Let’s look at the description of fetch:
The meaning behind is: Asynchronously obtain resources across the network.
Maybe there will be no such thing as ajax in the future. After all, there is no x in ajax.
Two of them on wiki
So it’s not called ajax
mdn also specifically pointed out that the most important thing in jax is the XMLHttpRequest object
It also shows that it is not considered ajax in other environments. This should be just an ordinary http request, similar to a browser making a request to access a website.
wiki: https://zh.wikipedia.org/wiki...
mdn: https://developer.mozilla.org...