Skip to main content
InterviewHubPRO
Section Overview
Q388

Question 388 of 536

Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

72%
JavaScript & V8 Internals (536 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

What is AJAX

senior LevelCode ExampleAsync & PromisesEvent LoopHTTP & REST APIs

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!
}