![]() | MSc-IT Study Material June 2010 Edition Computer Science Department, University of Cape Town |
AJAX is increasingly being used on the Web today. The main reasons for this are:
AJAX allows a Web page to only reload those portions which have changed, rather than reloading the whole page. This can substantially reduce the amount of bandwidth that the Web application requires.
Because AJAX allows for asynchronous communication, and for only reloading a portion of a Web document, it allows the Web application to be more frequently available to the user, since page reloads are reduced, and the user can continue using the application while data is being transmitted.
However, AJAX does have disadvantages, which need to be weighed up against the advantages, and mitigated where possible:
Dynamically created pages, such as most of those using AJAX, often renders the browser's history functionality useless. If the user moves away from a page, and then presses the back button to return to it, the page is not necessarily shown in the same state as when the user left it. It may be useful to expose all distinct functionality as separate URLs, so that the user can visit them using the back and forward buttons, or the browser's history list.
Similar to the above problem, it can be difficult to bookmark any useful page and return to it, since what the user was actually interested in bookmarking had been loaded dynamically.
Search engines indexing a website are not likely to find any of the dynamically generated content, which will effect how the site appears in search engines' rankings.