What is Ajax



The acronym of Ajax stands for Asynchronous JavaScript and XML, or Javascript and XML Asynchronous. Ajax is a programming language that allows the updating of specific sections of content on a web page, without the need to completely reload the page.

The term Ajax was first used by Jesse James Garret in 2005, in his publication “Ajax: a New Approach to Web Applications”.



Ajax Applications

With Ajax, web applications can send data from a server and retrieve it asynchronously (loading from the background), without interfering with the display and behavior of the existing page. By decoupling the data exchange layer from the presentation layer, Ajax allows web pages, and by extension web applications, to dynamically change content without needing to reload the entire page. Data can be retrieved using the “XMLHttpRequest” object. Despite the name, xml is not required (JSON is often used in the AJAJ variant), and requests do not have to be asynchronous.

Ajax is not a technology, but a group of technologies. HTML and CSS can be used in combination with it. JavaScript and the “XMLHttpRequest” object provide a method for asynchronously exchanging data between the browser and the server to avoid loading the page completely.

Drawbacks of Ajax

  • Any user whose browser does not support JavaScript or XMLHttpRequest, or has this functionality disabled, will not be able to properly use the pages that depend on Ajax. Simple devices (such as smartphones and PDAs) may not be supported. This may lead to not relying exclusively on Ajax.
  • Similarly, some web applications that use Ajax are built in a way that cannot be read by screen reading technologies, such as JAWS.
  • Screen readers who are able to use Ajax may not yet be able to correctly read dynamically generated content.
  • The same source policy prevents some of the Ajax techniques from being used across domains, although the W3C has a draft of the “XMLHttpRequest” object that enables this functionality.
  • The required asynchronous callback style of programming can lead to complex code that is difficult to maintain, debug, and test.
  • Web pages programmed with Ajax present a greater difficulty in performing a detailed web analysis of their interactions.
  • Due to the asynchronous nature of Ajax, every piece of data that is sent or received by the client occurs on a connection established specifically for that event. This creates a requirement that for each action, the client must probe the server, rather than listen, which incurs significant overhead. This overhead leads to several higher latency times with Ajax than can be achieved with a technology like websockets.

Related Terms