AJAX, Asynchronous JavaScript and XML is not a programming language, but a technology of development of interactive web applications. Those change their website content without necessity of complete reloading. It uses asynchronous process of websites with the help of library that is written in Javascript. Compared to classical web applications, they provide more suitable environment for the users, disadvantage is, that they require modern web browsers.
AJAX uses combination of built-in XMLHttpRequest object, which inquires of data from web server and JavaScript and HTML DOM, which displays data or works with them.
History
The term AJAX was publicly used for the first time in an article Ajax: A New Approach to Web Applications by Jesse James Garrett in 2005. Principles, on which Ajax is based, are much older. Among the beginnings it would be possible to include deployment of the element IFRAME to Internet Explorer 3.0 in 1996 or the element LAYER to Netscape Navigator 4.0 in 1997. The popularity of Ajax started by several services, behind which stands the Google company. It was used for Gmail firstly and then e.g. for the Google Maps.
Advantages of using Ajax
It allows reloading only part of a website. Most of the technologies allows to load changes only when you reload the whole website. On the other hand, Ajax allows to reload only a part of a website, which has changed, which significantly decreases the difficulty of web application on a bandwidth.
Better availability for the users. Because Ajax allows asynchronous communication and reloading of only a part of a website, allows web applications to be more available, because the reloading reduces, and the user can continue in using the web app even though the data are transferred at the same time.
Speed. Using Ajax decreases traffic on server and in request to both sides. Because of that, the time is reduced, which is needed for making a response on both sides.
Interaction. Ajax is very responsive. The whole page can transfer data at once.
Validation of forms. Forms are a common part of websites. Ajax allows to do validations immediately, because of that, the formulations can be optimized significantly.
Disadvantages of using Ajaxu
Browsing history. Dynamically created websites, e.g. those, which use Ajax, often disables usage of the browsing history. If the user moves among websites and then presses the button to go back, the website will not necessarily display in the same condition, in which the user left it. It can be useful to divide individual functionalities to separate URL, so the user could go back to them using the buttons to go back or forward even with the help of browsing history.
Problems with saving favourite websites. As in the previous point, it can be hard to add a website to favourites and then to go back to it on the websites using Ajax. The content the user wanted to save to favourites can be load dynamically and it does not have to return to the same content.
Indexing. It is a critical disadvantage, from the view of optimization in browsers, that the dynamically generated content will not be indexed in browsers. That is the reason why there will be a worse evaluation of relevance in browsers.
Open source. It is possible to display the source and whoever can display the code, which is for Ajax written.
Requires modern browsers. Some functions of Ajax are supported only by selected, the most modern browsers.
It cannot get information from another server. For the security reasons, XMLHttpRequest object can obtain information only from the host server of the homepage. If it’s necessary to obtain data from another source, Ajax doesn’t allow it.