The Term
Ajax has come to represent a broad group of web technologies that can be used to implement a web application that communicates with a server in the background, without interfering with the current state of the page. In a normal
Web application, users fill out form fields and click a
Submit button. Then, the entire form is sent to the server, the server passes on processing to a script and when the script is done, it sends back a completely new page. That page might be HTML with a new form with some data filled in or it might be a confirmation or perhaps a page with certain options selected based on data entered in the original form. Of course, while the script or program on the server is processing and returning a new form, users have to wait. But with Ajax, when a user clicks a button, you can use JavaScript and DHTML to immediately update the UI, and spawn an asynchronous request to the server to perform an update or query a database. When the request returns, you can then use JavaScript and CSS to update your UI accordingly without refreshing the entire page. Most importantly, users don't even know your code is communicating with the server: the Web site feels like it's instantly responding.
But now a question arises what are the benefits of AJAX?
1. A web page developed on Ajax has higher- Speed, Interactivity and Functionality.
2. Where the pages on a website consist of much content. There by using Ajax, a web application can request only the content that needs to be updated, thus drastically reducing bandwidth usage.
3. With so many techniques and languages, Ajax gives programmers the freedom to adopt and adapt features as per their requirement.
4. The use of Ajax can reduce connections to the server, since scripts only have to be requested once.
5. If a page section encounters an error, other sections are not affected and the data already entered by the user is not lost. Hence this doesn’t bother the user.
But as its said there are two sides of coins. One side we have already mentioned and the other side is its disadvantages which are-:
1. As we click the browser's "back" button it not return the user to an earlier state of the Ajax-enabled page, but would instead return them to the last page visited before it.
2. Ajax can increase development time and costs. It is usually considered more difficult than building a classic web application, because of the mixture of technologies and the special concern about everything going smoothly because it is dealing with relatively known technologies.
3. AJAX is not meant to be used in every application. One of the main reasons for this stays in the fact that Google cannot index it.
4. Any user whose browser does not support Ajax or JavaScript, or simply has JavaScript disabled, will not be able to use its functionality.
5. The other fault lies in the actual XML Http Request object itself.
So we can say that besides some flaws of Ajax, it has helped to overcome various issues.