Old TechnologiesLesson 50Free preview
JS AJAX
This lesson is part of JavaScript · All levels
Summary
AJAX (Asynchronous JavaScript And XML) is a technique of sending and receiving data to a server without reloading an entire page. Historically implemented with XMLHttpRequest objects, it is now more commonly used with the Promise-based Fetch API. Because the process is asynchronous, users can still interact with the page while waiting for the server's response.
Key points
- AJAX updates some of the pages to make the user experience smoother
- XMLHttpRequest is a classic object with open, send, and event onreadystatechange methods
- Fetch API is a modern replacement for Promise-based
- The server response is generally JSON, although the AJAX name refers to XML.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.