The term Ajax was first used by Jesse James Garret in 2005, in his publication “Ajax: a New Approach to Web 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.
Drawbacks of 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.