Glossary · Web Development

AJAX (Asynchronous JavaScript and XML)

AJAX is a technique where a page requests data from a server in the background with JavaScript and updates part of the page without a full reload.

Updated October 6, 2026

AJAX (Asynchronous JavaScript and XML) is a set of techniques for sending and receiving data from a server in the background while the user stays on the page. Despite the name, modern AJAX almost always exchanges JSON rather than XML.

Why it matters

AJAX made interactive pages possible: live search suggestions, infinite scrolling and form submission without losing your place. It also means important failures can be invisible. A background request can fail with a 500 while the page itself still loads normally, so monitoring only the page URL misses it.

Example

fetch('/api/search?q=kettle')
  .then(r => r.json())
  .then(items => render(items));

The older XMLHttpRequest object does the same job with a callback style. Both run asynchronously, so the page stays responsive.

Common mistakes

  • Not handling error responses, leaving users with a spinner forever.
  • Treating AJAX as a specific library. It is a pattern.
  • Sending requests on every keystroke without a debounce delay.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.