JavaScript - XMLHttpRequest and AJAX

preview_player
Показать описание
Learn about XHR (XMLHttpRequest) and its relationship with AJAX. Also compare XMLHttpRequest vs fetch().

Become a Better Developer

My Software

Download Code

⌛ Timestamps
0:00 – Introduction
0:21 – What is an XMLHttpRequest?
0:53 – What is AJAX?
1:11 – Creating a XHR
1:50 – Initializing a XHR with open()
3:16 – Sending a XHR with send()
3:52 – Handling XHR Response with readyStateChange
6:27 – Accessing XHR Response Data
7:51 – AJAX and XMLHttpRequest Example
10:21 – Debugging
11:14 – XHR vs fetch()
12:06 - Outro
Рекомендации по теме
Комментарии
Автор

how to create an javascript interceptor, that intercept every xmlHttpRequest, and show an alert each time the xmlHttpRequest goes in error or errorCode is != 200?

ghury
Автор

If you are calling a PHP file that reads from a database, how does the result get put into .response? That is what do you have to code in the php file to say "this is the response." If you use echo how do you prevent that displaying on the webpage?

railwaysmodelselectronics
Автор

Anderson Thomas Hall Gary Martin Laura

pauleedavidson
welcome to shbcf.ru