Programming – Pros and Cons of Ajax Technology

Funny business yoga

The biggest advantage of Ajax technology is that data can be changed without the complete web page having to be reloaded from the web browser.

This allows web applications to respond quickly to user input. Moreover, the issue of static data that has not changed and needing to be transmitted continuously via the Internet is nullified.

No browser plug-in is required

Since the Ajax technologies are freely available, they are supported independently of the operating system and web browsers that also support JavaScript. Therefore, a browser plug-in is not required.

This requires that JavaScript support has been disabled – this represents the biggest point of criticism and the greatest problems when using, comparable techniques, such as Adobe’s Shockwave or Flash.

But still suffer from the disadvantage that they are proprietary, require a browser plug-in and are only available for certain platforms.

Extensive testing is required

An Ajax -based application must be rigorously tested to deal with the idiosyncrasies of the various browsers accordingly.

Over time, the Ajax technology has evolved, which has led to the availability of several libraries. This can contribute to a largely trouble-free and simpler application programming.

Server-side browser detection

Techniques such as Sun JSF technology or the Apache Wicket web forms have been developed by Microsoft that allow designing of web-based applications that are similar to a desktop application. In addition, they offer the possibility of using a Web browser without JavaScript support to operate properly.

The browser type of the user in this case is determined on the server side, so it is possible to send only HTML pages, which can be displayed by the web browser.

Use of the “Back” button

One of the most frequently raised disadvantages of Ajax technology is the fact that it is difficult to ensure the functionality of the “Back” button of the browser.

There is a risk that clicking the “back” button does not restore the previous state of the application, because browsers usually only have static pages saved in their history.

Distinguishing between a static page that was loaded entirely in the browser’s cache, and a page that has been modified in a dynamic manner, may be tricky.

Due to the dynamics with which many Ajax applications are affected, this is not always possible because the individual navigation steps of the user are technically very difficult to reproduce.

Software developers have invented different solutions to address this problem. Most solutions are based on so-called inline frames and other HTML elements.

The inline frame element is designed so that this is not visible to the user, and is used to fill the browser history of the user on this detour. Google Maps for example, leads a search in an invisible inline frame element filled with the resulting outcomes of the visible element of the Ajax website.

The Dojo toolkit enables the individual Ajax requests using a call back function. The callback is always triggered when the user clicks the browser’s “back” button. With this detour, it is possible to restore the previous state of the application.

About the Author