WebBuilding

Languages and formats

Ajax

Summary

Ajax is a technique for building web pages that request data from a server in the background and update only part of the page, without a full reload. Jesse James Garrett of Adaptive Path named it in an essay dated February 18, 2005, citing Google Suggest and Google Maps. It rests on XMLHTTP, an object Microsoft built for Outlook Web Access and shipped with Internet Explorer 5 in March 1999. Today the Fetch Standard's fetch() function, available across browsers since March 2017, does the same job.

What Ajax is

Ajax is a way of building web pages that fetch new information from a server in the background and change only the part of the page that needs it, without loading a whole new page. MDN, Mozilla’s developer reference, defines it as a technique in which a web app makes asynchronous HTTP requests and uses the answers to update the relevant parts of the page.1 Asynchronous means the page does not freeze while it waits: the visitor can keep reading, typing or clicking, and the new content appears when it arrives.

The name was coined by Jesse James Garrett, president and founder of the design firm Adaptive Path, in an essay dated February 18, 2005. He called it “shorthand for Asynchronous JavaScript + XML.”2 He spelled it Ajax; MDN gives both Ajax and AJAX.1

Garrett insisted that Ajax “isn’t a technology” but a combination of several that already existed.2 His list had five parts:2

  • XHTML and CSS for presenting the page in a standards-based way.
  • The Document Object Model (DOM), the browser’s live map of the page, for changing what is shown.
  • XML and XSLT for exchanging and transforming data.
  • XMLHttpRequest, a browser object, for fetching data in the background.
  • JavaScript to tie the rest together.

Of the five, XMLHttpRequest was the piece that made the background requests possible. MDN describes it as an object that can retrieve data from a URL without a full page refresh, so a page can update just one part without disrupting what the user is doing.3 Despite its name it can carry any kind of data, not only XML.3 The current standard puts it more bluntly: the name “is historical and has no bearing on its functionality.”4

Before the name: XMLHTTP at Microsoft (1998 to 2000)

The object behind Ajax began at Microsoft, inside the team building Exchange 2000, the company’s email server. Alex Hopmann, who worked on that team, has published his account of how it happened.5

The team was rewriting Outlook Web Access (OWA), the version of Outlook that runs inside a web browser. Hopmann describes the earlier version as a rushed set of server pages with serious scalability and performance problems. Work on the new one began, he recalls, “probably sometime in late 1998.”5 The new client was built with Dynamic HTML (DHTML), scripts that change a page after it has loaded, and it needed a clean way to talk to the server without awkward form posts. Hopmann says he wrote the first version of the component over a weekend in Visual Studio.5

A colleague, Shawn Bracewell, then rewrote the code and added support for asynchronous requests.5 To get it to users, Hopmann noticed that the MSXML library, Microsoft’s XML software, shipped with Internet Explorer. The team struck a deal with Jean Paoli, who ran the XML team, to ship the new object inside MSXML. It was checked in a week before Internet Explorer 5’s second beta, the last beta before release, with sign-off from Joe Peterson, who was running Internet Explorer at the time.5

The name was partly marketing. Hopmann writes that the component “is mostly about HTTP and doesn’t have any specific tie to XML,” but XML was the fashionable technology of the day and shipping inside the XML library gave a reason to put XML in the name.5

Internet Explorer 5 was released on March 18, 1999. Microsoft’s announcement promoted its support for XML 1.0, XSL, HTML 4.0 and CSS, but did not mention the new object.6 Microsoft’s Internet Explorer team later wrote that XMLHTTP “was first introduced to the world as an ActiveX control in Internet Explorer 5.0.”7 An ActiveX control is a piece of Windows software that a web page can call. In Internet Explorer 6 and earlier, a script created it with a line such as new ActiveXObject(“Microsoft.XMLHTTP”).7

Microsoft released Exchange 2000 to manufacturing on September 1, 2000, with retail copies expected by the end of that month.8 Hopmann describes its Outlook Web Access as written “for IE5 and later.”5 It took the team another year and a half to ship Exchange 2000, he says, so by the time it reached customers the browser parts were already widely installed.5

Other browsers adopt XMLHttpRequest (2001 to 2006)

Other browser makers built their own versions of the object, under the name XMLHttpRequest. An entry dated March 7, 2001, on the XML Cover Pages, summarizing Mozilla’s XML Extras module, describes its support for HTTP GET and POST of XML documents as the “Equivalent of the IE XMLHttpRequest object.” At that point the module was in nightly test builds but not part of the projected Seamonkey package, the planned Mozilla browser suite.9

Apple’s developer documentation for Safari and its WebKit engine also lists support for the XMLHttpRequest object. It noted that most versions of Internet Explorer on Windows could not create the object the same way, and pointed developers to cross-browser sample code for versions before Internet Explorer 7.10

That gap meant years of browser-sniffing code. Microsoft’s own sample, published on January 23, 2006, first checks for a native XMLHttpRequest, used by “IE7, Mozilla, Safari, etc,” and falls back to the ActiveX control for Internet Explorer 5 and 6.7 Internet Explorer 7 added a native XMLHttpRequest object that worked the same way as in other browsers, so pages no longer needed ActiveX switched on, while keeping the old control for existing pages.7 In the same post, Microsoft called the object “the cornerstone of ‘AJAX’ web applications.”7 Microsoft released Internet Explorer 7 for Windows XP on October 18, 2006.11

Gmail, Google Maps and the 2005 essay

The technique reached a wide public through a run of Google products, several years after XMLHTTP first shipped.

  • Gmail. Google announced its email service on April 1, 2004, as a preview release for a small group of testers. It offered 1,000 megabytes of free storage and search across every message sent or received.12
  • Google Suggest. On December 10, 2004, a Google Labs project began offering search suggestions “in real time, while you type.”13
  • Google Maps. Announced on February 8, 2005, it let users click and drag the map to see the next area, with “no wait for a new image to download.”14

Ten days after Google Maps appeared, Garrett’s essay opened with Google Suggest and Google Maps as examples of a new kind of web application. He also listed Gmail, Orkut, the beta of Google Groups, the photo site Flickr and Amazon’s A9.com search engine, and wrote that “Google is making a huge investment in developing the Ajax approach.”2

The essay contrasted two models. In the classic web application, most user actions send a request to the server, which builds and returns a whole new page; Garrett asked what the user does while the server works, and answered “waiting.”2 In the Ajax model, the browser loads an “Ajax engine,” a layer of JavaScript, at the start of a session. That engine draws the interface and talks to the server in the background, removing what Garrett called the “start-stop-start-stop nature of interaction on the Web.”2

A question-and-answer section added on March 13, 2005, said that neither Adaptive Path nor Google invented Ajax and that the name was not proprietary. It also said XML was not required: other formats such as JSON could be used instead.2 Asked why the approach needed a name, Garrett said he wanted something shorter than “Asynchronous JavaScript+CSS+DOM+XMLHttpRequest.”2

The essay spread quickly. In “What Is Web 2.0,” dated September 30, 2005, Tim O’Reilly wrote that the technologies Google used had been christened AJAX in “a seminal essay” by Garrett, quoted its list of parts, and called AJAX a key component of Web 2.0 applications such as Flickr. He also wrote that the web’s potential to deliver full applications did not reach the mainstream until Google introduced Gmail.15

Accounts of who invented the approach differ. In a 2007 update, Hopmann responded to a talk by Adam Bosworth that some readers took as a claim to have invented Ajax. Hopmann wrote that “both are true.” In his view, Bosworth and the people he worked with had the conceptual vision for tying the pieces together, which Bosworth called “weblications,” but they never built a real application with it, and doing so turned up missing pieces such as XMLHTTP. He credited Adaptive Path with a clear description of the approach and wrote that Microsoft “totally blew the opportunity” to promote the approach in 1999.5

Libraries soon hid the browser differences. jQuery, released as version 1.0 by John Resig on August 26, 2006, included a jQuery.ajax() function from that first version, which its documentation describes as a way to “perform an asynchronous HTTP (Ajax) request.”1617 Since version 1.5 the object it returns has been a superset of the browser’s native XMLHttpRequest.17

Standardizing XMLHttpRequest (2004 to 2016)

For years XMLHttpRequest worked in every major browser without any formal standard describing it. The current standard records its path: it was first defined as part of the WHATWG‘s HTML work, “based on Microsoft’s implementation many years prior,” moved to the W3C in 2006, and moved back to the WHATWG at the end of 2012.4 A message to the WHATWG list on October 19, 2004, already welcomed the object’s inclusion in that group’s web applications specification.18

The W3C published its first public draft, “The XMLHttpRequest Object,” on April 5, 2006. Its editors were Anne van Kesteren of Opera Software and Dean Jackson of the W3C. The draft set out to record the features browsers already shared, and admitted that “the implementations are not completely interoperable.”19

A second draft, XMLHttpRequest Level 2, followed on February 25, 2008. It added requests to other sites, progress events for tracking uploads and downloads, and handling of raw binary data.20

Requests to other sites needed a safety rule. By default, browsers let a script read responses only from the same origin (the same scheme, domain and port) as the page that loaded it, a restriction called the same-origin policy.21 Cross-Origin Resource Sharing, or CORS, lets a server opt in by sending a header such as Access-Control-Allow-Origin. For requests that could change data, the browser first sends a “preflight” OPTIONS request to ask permission.2221 CORS became a W3C Recommendation on January 16, 2014, edited by van Kesteren.22

The W3C later stopped its own XMLHttpRequest work. A Working Group Note dated October 6, 2016, says work on its XMLHttpRequest Level 1 “has been discontinued” and points readers to the living standard.23 As of October 2026, the WHATWG’s XMLHttpRequest Living Standard was last updated on October 19, 2026.4 It also says synchronous XMLHttpRequest, which freezes the page until an answer arrives, is “in the process of being removed” outside of background worker scripts.4

Fetch: the modern successor (2013 onward)

By the early 2010s the rules for how a browser fetches anything, from images to scripts to XMLHttpRequest calls, were spread across several documents. On May 22, 2013, van Kesteren asked the WHATWG list to review a new Fetch specification meant to define fetching across the whole platform, replacing rules then split among HTML, CORS, the web origin concept and Content Security Policy.24 In a blog post the next day he wrote that it would supersede the HTML fetch and CORS specifications.25

The Fetch Standard now states its goal as unifying fetching across the web platform, covering redirects, cross-origin rules, service workers, mixed content and more.26 It also defines the fetch() JavaScript function, which it says exposes most of the networking features “at a fairly low level of abstraction.”26 As of October 2026, the Fetch Living Standard was last updated on October 19, 2026.26

Browsers shipped fetch() over two years:

BrowserDateWhat happened
Chrome 42 betaMarch 12, 2015Fetch available in pages and in shared and dedicated workers27
Firefox 39July 2, 2015Fetch switched on by default28
Safari 10.1March 29, 2017Fetch added as “a modern replacement for XMLHttpRequest”29

MDN says fetch() has been available across browsers since March 2017.30 Jake Archibald, introducing the API in March 2015, argued that XMLHttpRequest “smushes the request and response together,” while fetch offers a better API for simple tasks using newer JavaScript features such as promises.31 A promise is an object that stands for a result that will arrive later, so code can say what to do next without nesting callbacks.

MDN’s guide summarizes the main differences:32

  • Promises instead of callbacks. fetch() returns a promise that resolves to a Response object.
  • HTTP errors are not failures. A 404 or 504 answer still resolves the promise, so code must check the response’s ok or status property. Only problems such as a network error reject it.30
  • Cancelling. An AbortController can stop a request.
  • Streaming. Request and response bodies are streams, so a page can process data as it arrives instead of waiting for all of it.

Fetch also spread beyond browsers. Node.js 18, released in April 2022, made an experimental global fetch available by default, based on the undici library.33 The Node.js 21 announcement in October 2023 said fetch and web streams had been marked stable.34

The word itself has faded as the technique became normal. MDN notes that Ajax was first built on XMLHttpRequest, that fetch() suits modern web applications better, and that the practice is now so common that the specific term “Ajax” is rarely used.1 It adds that Ajax can be used to build single-page apps, in which the whole app is one document that updates its own content, and that modern web frameworks provide their own tools for it.1

Timeline

  1. Node.js 21 announcement says fetch is marked stable34
  2. Node.js 18 adds an experimental global fetch33
  3. Safari 10.1 adds the Fetch API29
  4. W3C discontinues its XMLHttpRequest Level 1 document23
  5. Firefox 39 switches on fetch by default28
  6. Chrome 42 beta brings fetch to web pages27
  7. CORS becomes a W3C Recommendation22
  8. Anne van Kesteren asks for review of the Fetch specification24
  9. Internet Explorer 7 ships with a native XMLHttpRequest object11
  10. jQuery 1.0 is released16
  11. W3C publishes its first draft of the XMLHttpRequest Object19
  12. Jesse James Garrett names Ajax in an Adaptive Path essay2
  13. Google introduces Google Maps, with a draggable map14
  14. Google announces Gmail as a preview release12
  15. Internet Explorer 5 is released; XMLHTTP ships as an ActiveX control7

What it means for your website

Almost every modern site uses Ajax somewhere, whether or not anyone calls it that. Contact forms that confirm without a reload, filters on a product list, “load more” buttons and live search all send background requests. A few things are worth checking.

  • Make sure search engines can see your content. Google says it processes JavaScript pages in three phases: crawling, rendering and indexing. It can only index content that appears in the rendered page, and it can only follow links written as normal <a> elements with an href. Google still calls server-side rendering or pre-rendering “a great idea” because not all bots can run JavaScript.35 If your main text or your menu loads only after a background request, ask your developer how it appears to crawlers. Our websites and SEO guide covers what each builder lets you control.
  • Know where WordPress sends its requests. In WordPress, the plugin handbook says all classic Ajax requests go to wp-admin/admin-ajax.php.36 Newer features use the REST API, which exchanges JSON data and is the foundation of the block editor.37 Security or caching rules that block either path can quietly break forms and plugins, so test both after any change to your firewall, caching or security plugin.
  • Expect CORS errors when mixing domains. If a script on your site calls a service on another domain, the browser blocks the answer unless that service sends the right CORS headers.21 The fix belongs on the server you are calling, not in your page.
  • Retire old Ajax code. Synchronous XMLHttpRequest on the main page is being removed from the web platform.4 If a developer is updating an older theme or script, ask them to move it to fetch(), which MDN calls the modern replacement.32

For how pages, servers and browsers fit together, see our guide to how a website works.

See also

References

  1. Ajax (glossary). MDN Web Docs, Mozilla. accessed October 22, 2026.
  2. Ajax: A New Approach to Web Applications. Jesse James Garrett, Adaptive Path (2007 print copy of the essay, hosted by MIT). 2005-02-18. accessed October 22, 2026.
  3. XMLHttpRequest. MDN Web Docs, Mozilla. accessed October 22, 2026.
  4. XMLHttpRequest Living Standard. WHATWG. 2026-10-19. accessed October 22, 2026.
  5. The story of XMLHTTP. Alex Hopmann, alexhopmann.com (undated essay with a January 31, 2007 update; page last updated August 4, 2025). 2025-08-04. accessed October 22, 2026.
  6. Microsoft Delivers World's Fastest Modern Browser Available Today. Microsoft. 1999-03-18. accessed October 22, 2026.
  7. Native XMLHTTPRequest object. Sunava Dutta, IEBlog, Microsoft. 2006-01-23. accessed October 22, 2026.
  8. Microsoft Releases Exchange 2000 to Manufacturing. Redmond Magazine. 2000-09-05. accessed October 22, 2026.
  9. XML in Mozilla. Robin Cover, The XML Cover Pages. accessed October 22, 2026.
  10. Using XMLHttpRequest Objects (Safari JavaScript Programming Topics). Apple Developer Documentation Archive. 2017-09-19. accessed October 22, 2026.
  11. Microsoft Releases Windows Internet Explorer 7 for Windows XP. Microsoft. 2006-10-18. accessed October 22, 2026.
  12. Google Gets the Message, Launches Gmail. Google press release. 2004-04-01. accessed October 22, 2026.
  13. I've got a suggestion. Kevin Gibbs, Official Google Blog. 2004-12-10. accessed October 22, 2026.
  14. Mapping your way. Bret Taylor, Official Google Blog. 2005-02-08. accessed October 22, 2026.
  15. What Is Web 2.0 (page 5). Tim O'Reilly, O'Reilly Media. 2005-09-30. accessed October 22, 2026.
  16. jQuery 1.0. John Resig, jQuery Blog. 2006-08-26. accessed October 22, 2026.
  17. jQuery.ajax(). jQuery API Documentation, OpenJS Foundation. accessed October 22, 2026.
  18. [whatwg] XML Extras. Dean Edwards, WHATWG mailing list. 2004-10-19. accessed October 22, 2026.
  19. The XMLHttpRequest Object (W3C Working Draft). W3C. 2006-04-05. accessed October 22, 2026.
  20. XMLHttpRequest Level 2 (W3C Working Draft). W3C. 2008-02-25. accessed October 22, 2026.
  21. Cross-Origin Resource Sharing (CORS). MDN Web Docs, Mozilla. accessed October 22, 2026.
  22. Cross-Origin Resource Sharing (W3C Recommendation). W3C. 2014-01-16. accessed October 22, 2026.
  23. XMLHttpRequest Level 1 (W3C Working Group Note). W3C. 2016-10-06. accessed October 22, 2026.
  24. Fetch: please review. Anne van Kesteren, WHATWG mailing list. 2013-05-22. accessed October 22, 2026.
  25. Fetching URLs. Anne van Kesteren, annevankesteren.nl. 2013-05-23. accessed October 22, 2026.
  26. Fetch Living Standard. WHATWG. 2026-10-19. accessed October 22, 2026.
  27. Chrome 42 Beta: Push Notifications, Promoting Add to Home Screen and ES6 Classes. John Mellor and Michael van Ouwerkerk, Chromium Blog. 2015-03-12. accessed October 22, 2026.
  28. Firefox 39 for developers. MDN Web Docs, Mozilla. accessed October 22, 2026.
  29. New Web Features in Safari 10.1. Jon Davis, WebKit Blog. 2017-03-29. accessed October 22, 2026.
  30. Window: fetch() method. MDN Web Docs, Mozilla. accessed October 22, 2026.
  31. That's so fetch. Jake Archibald, jakearchibald.com. 2015-03-24. accessed October 22, 2026.
  32. Using the Fetch API. MDN Web Docs, Mozilla. accessed October 22, 2026.
  33. Node.js 18 is now available. The Node.js Project. 2022-04-19. accessed October 22, 2026.
  34. Node.js 21 is now available. The Node.js Project. 2023-10-17. accessed October 22, 2026.
  35. Understand JavaScript SEO basics. Google Search Central. accessed October 22, 2026.
  36. AJAX (Plugin Handbook). WordPress Developer Resources, WordPress.org. accessed October 22, 2026.
  37. REST API Handbook. WordPress Developer Resources, WordPress.org. accessed October 22, 2026.

Web Building Encyclopedia. First published October 22, 2026. Last reviewed October 22, 2026. Every fact on this page is linked to a source we opened. Spotted an error? Write to [email protected].