JavaScript Internals (521 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)
What is AJAX
AJAX stands for Asynchronous JavaScript and XML and it is a group of related technologies(HTML, CSS, JavaScript, XMLHttpRequest API etc) used to display data asynchronously. i.e. We can send data to the server and get data from the server without reloading the web page.
Practical Code Example
javascript
// AJAX (Asynchronous JavaScript and XML): Updating web pages without reloading
// Modern standard implementation using Fetch API:
async function loadUserData() {
const response = await fetch('/api/user');
const data = await response.json();
document.getElementById('username').textContent = data.name; // Updates in-place!
}