Skip to main content

Asynchronous JavaScript and XML (AJAX)

PropertyValue
descriptionBrowser technique for sending asynchronous HTTP requests and updating page content without a full reload.
tagsref
rating

AJAX stands for Asynchronous JavaScript and XML.

It is a browser-side technique for sending asynchronous HTTP requests to a server and updating part of a page without reloading the entire document.

Today, AJAX most often works with JSON and API responses, even though the original name includes XML.

What it does

AJAX lets the frontend exchange data with a backend in the background while the current page stays open and interactive.

It is commonly used to:

  • Load or refresh data without a full page reload
  • Submit forms asynchronously
  • Fetch data from an API or REST API
  • Update tables, filters, search results, or dashboards dynamically
  • Validate or save user input in the background

Core concepts

Asynchronous requests

With AJAX, the browser sends a request and continues running the page while it waits for the response.

That is what makes interfaces feel faster and less disruptive than full page refreshes.

Partial page updates

AJAX usually updates only part of the interface instead of replacing the whole page.

That makes it useful for interactive application-style interfaces in the browser.

XML vs JSON

The original term includes XML, but modern AJAX workflows usually exchange JSON instead.

The important idea is the asynchronous browser request, not the exact data format.

Common use cases

  • Autocomplete and live search
  • "Load more" lists and filtered content
  • Inline form validation
  • Background saves and autosave
  • Admin dashboards and dynamic controls
  • Browser clients that consume a REST API

Practical notes

  • AJAX is a concept and workflow, not one single library or browser API.
  • Older code often uses XMLHttpRequest, while modern code often uses fetch.
  • AJAX is still relevant even if people now talk more often about fetch, SPAs, or API-driven frontends.
  • In WordPress, AJAX often refers to background browser requests handled either through admin-ajax.php or custom REST API endpoints.

Sources Used

Frequently Asked Questions

Is AJAX outdated?

No. The term is older, but the underlying pattern is still common.

Modern frontends still make asynchronous browser requests constantly, even when they use newer APIs such as fetch.

Does AJAX require XML?

No. AJAX originally included XML in the name, but modern implementations usually exchange JSON instead.

Is fetch the same as AJAX?

Not exactly. fetch is a browser API for making requests. AJAX is the broader pattern of sending asynchronous requests and updating the page without a full reload.