Web APIs
Last updated
Last updated
Fetch:
a better version of XHR
it returns Promise: fetch(
) .then(resp => resp.json());`
4xx and 5xx are not considerd as error so it's in then
living standard: safari and IE not support it
XMLHttpRequest:
background thread (other than UI thread)
cannot access DOM
different context window
Proxy between browser and network. Handles network requests. Thus enabling offline experience.
it's web worker and more
cannot access DOM
Communicate from browser to server.
Socket.IO: A long polling/WebSocket based third party transfer protocol for Node.js.