AJAX (Asynchronous JavaScript and XML)

by Sonam Singh 04-Mar-19

0 219


AJAX (short for Asynchronous JavaScript and XML) is a set of web development techniques on the client side to create asynchronous web applications. With AJAX, web applications can send and retrieve data from a server in the background (asynchronously) without interfering with the user interface and behavior of the existing page. AJAX allows web pages and web applications to change content dynamically without the need to reload the entire page.

Google Maps is one well-known application that uses AJAX. The interface allows user to change view and manipulate the map in real time. AJAX applications do not require installation of a plug-in and work directly with Web browser. AJAX is not a proprietary technology or a product but it the combination of technologies.


How AJAX works?
Applications, which use AJAX, use an engine that acts as an intermediary between user's browser and the server from which it is requesting information. Instead of loading whole web page, User's browser loads the AJAX engine which further loads the page which user sees. AJAX engine continuous to run in the background and communicate with the browser using JavaScript. Any input or clicks on the page sends a JavaScript call to AJAX engine which responds instantly in most of the cases. If the engine needs additional data to give back to user, it requests it from the server, usually using XML, while it is simultaneously updating the page.

History:
Before Ajax most Web sites were based on complete HTML pages. Each user action required that a complete new page be loaded from the server. This process was inefficient, as reflected by the user experience: all page content disappeared, and then the new page appeared. Each time the browser reloaded a page because of a partial change, all of the content had to be re-sent, even though only some of the information had changed.

This placed additional load on the server and made bandwidth a limiting factor on performance. Google made a wide deployment of standards-compliant, cross browser AJAX with Gmail (2004) and Google Maps (2005). On 5 April 2006, the World Wide Web Consortium (W3C) released the first draft specification for the XMLHttpRequest object in an attempt to create an official Web standard.


Ajax Incorporated Technologies:
* HTML and CSS: For representation.
* DOM (Document Object Model): For dynamic display and interaction with data.
* JSON and XML: For data communication
* XMLHttpRequest: For asynchronous communication.
* JavaScript: To bring all these technologies together in one application.


Disadvantages:
* Any user whose browser does not support JavaScript or XMLHttpRequest, or has this functionality disabled, will not be able to properly use pages that depend on AJAX.
* Web applications that use AJAX are built in a way that cannot be read by screen-reading technologies.
* Because of the asynchronous nature of Ajax, each chunk of data that is sent or received by the client occurs in a connection established specifically for that event. This creates a requirement that for every action, the client must poll the server, instead of listening, which incurs significant overhead.
* Dynamic Web page updates also make it difficult to bookmark and return to a particular state of the application.
To read more about Ajax - follow this


Share:


Comments

    No Comments Yet.

Leave a Reply