Skip to main content

Close
Get the best research tool on the web today,and free!
Connect with people with common interests!

saved by14 people, first bySamuel cartaxo on 2006-03-02, last byMatthew Llewellin on 2008-08-01

  • creating interactive web applications.
  • the entire web page does not have to be reloaded each time the user performs an action.
  • extra data is requested from the server and loaded in the background without interfering with the display and behavior of the existing page.
  • Web pages, unlike native applications, are loosely coupled, meaning that the data they display are not tightly bound to data sources and must be first marshaled (set out in proper order) into an HTML page format before they can be presented to a user agent on the client machine. For this reason, web pages have to be re-loaded each time a user needs to view different datasets. By using the XMLHttpRequest object to request and return data without a re-load, a programmer bypasses this requirement and makes the loosely coupled web page behave much like a tightly coupled application, but with a more variable lag time for the data to pass through a longer "wire" to the remote web browser.
  • For example, in a classic desktop application, a programmer has the choice of populating a tree view control with all the data needed when the form initially loads, or with just the top-most level of data—which would load more quickly, especially when the dataset is very large. In the second case, the application would fetch additional data into the tree control depending on which item the user selects. This functionality is difficult to achieve in a web page without Ajax. To update the tree based on a user's selection would require the entire page to re-load, leading to a very jerky, non-intuitive feel for the web user who is browsing the data in the tree.