# AJAX

Category: [Rendering & JavaScript](https://seo-geo-glossary.com/en/glossary/category/rendering-javascript/) › [JavaScript & frameworks](https://seo-geo-glossary.com/en/glossary/category/rendering-javascript/javascript-frameworks/)

**AJAX** (Asynchronous JavaScript and XML) is a technique where a web page requests data from the server in the background and updates only the affected part of the page. This entry covers the web technique, not the many companies and sports clubs that share the name.

## How does AJAX work?

The browser sends an asynchronous HTTP request, receives the response, and changes the DOM with it. The original API for this was `XMLHttpRequest`. MDN now points to the Fetch API for new code. JSON has largely replaced XML as the data format, and MDN notes that the term "Ajax" itself is rarely used in modern web development.

## What does it mean for SEO?

Google renders JavaScript with a headless Chromium, so content loaded through such requests can generally be seen. Two points from Google's documentation matter for loaded content.

- Googlebot does not request URLs that robots.txt blocks, so blocked scripts and data endpoints stay unavailable for rendering.
- Different views should have their own URLs managed with the History API. Google's guide advises against URL fragments for loading different content, and the older AJAX crawling scheme with `#!` is obsolete.

Modern JavaScript sites often combine this with server-side rendering, because Google says it makes pages faster for users and crawlers and not all bots can run JavaScript.

## Example

```javascript
const res = await fetch('/api/products?page=2');
const data = await res.json();
document.querySelector('#list').innerHTML = data.html;
```

Page 2 of the product list appears in the DOM while the address bar stays the same. For a search engine to find these products, each page should also be reachable under its own URL.

## Common mistakes

- **Loading content only after a click or scroll**: Google says its search does not interact with the page. Content that arrives only after a user action may never appear in the rendered HTML.
- **Views behind `#` fragments**: Google advises giving views their own URLs with the History API. Google discovers links only in `<a>` elements with an `href`.
- **Error state with status 200**: If pages that fetch data with JavaScript keep reporting `200` on errors, error pages can be indexed. Google names a redirect to a real 404 page or a `noindex` tag as fixes.
- **Endpoint blocked in robots.txt**: Googlebot makes no request for blocked URLs and does not render JavaScript from blocked files.
- **WebSockets and WebRTC**: Googlebot retrieves content with HTTP requests and does not support other connection types.

## FAQ

**What does AJAX stand for?** Asynchronous JavaScript and XML.

**Is AJAX still used?** The technique is everywhere, the name much less. It lives on in fetch calls and in frameworks that load data after the first render.

## Related terms

- [JavaScript SEO](https://seo-geo-glossary.com/en/glossary/javascript-seo/index.md)
- [Single-page application](https://seo-geo-glossary.com/en/glossary/single-page-application/index.md)
- [Rendering](https://seo-geo-glossary.com/en/glossary/rendering/index.md)
- [DOM](https://seo-geo-glossary.com/en/glossary/dom/index.md)
- [Rendered HTML](https://seo-geo-glossary.com/en/glossary/rendered-html/index.md)

## Sources

- [Ajax - MDN Glossary](https://developer.mozilla.org/en-US/docs/Glossary/AJAX)
- [Fix Search-related JavaScript problems - Google Search Central](https://developers.google.com/search/docs/crawling-indexing/javascript/fix-search-javascript)
- [JavaScript SEO basics - Google Search Central](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/ajax/
