What is Ajax?

   

Ajax is an acronym for Asynchronous JavaScript and XML. Ajax is a technique whereby a website can update part of a page without refreshing the whole content. This saves bandwidth and provides for a more interactive user experience. In other words, changes that a user makes appear quicker on the screen, and the website seems to respond much faster. The improved action increases the interactivity of websites and makes the user experience much more enjoyable. It should be noted that Ajax is not a technology in its own right, rather, it is a technique that utilizes other technologies. Ajax is considered one of the core techniques behind Web 2.0 applications.

The main components behind Ajax are XHTML, the DOM model, JavaScript, XML, and CSS. Websites coded in XHTML have very accessible Document Object Models, by definition. JavaScript can be used to interact with the DOM, and to manipulate it. As the JavaScript can also make HTTP requests, it is a convenient bridge for requesting new data from the webserver, and for replacing part of the webpage with the new content. Usually, the new content is transferred in XML, as XML is relatively easy to parse. Finally, CSS is used to define page markup. Note that the webserver in question must be running a programming language capable of serving XML requests to Ajax applications, such as PHP or Perl.

While the use of Ajax generally makes websurfing more enjoyable for the user, the programmer must be careful not to break accepted website behavior with Ajax. A common problem with Ajax applications is the disability of the web browser's Back button. In a normal non-Ajax application, every webpage has a unique URL. Thus, a user can hit the Back button to take him back to the previous URL, which would be the state that the browser was in before the user's last action. This can be seen as a sort of Undo operation. However, with Ajax the URL of the webpage does not change every time the state of the web application changes. Therefore a press of the back button will bring the user to a state much further back than he might have intended. Also, page bookmarking is dependant upon the URL of the page in question. Therefore, pages created by Ajax will not be bookmarkable. Professional programmers have in fact developed techniques to circumvent these issues, however, they are far from perfect.



StumbleUpon Toolbar

del.icio.us

Submit to Technorati

Rate this answer: (What is Ajax?)
Anything else you'd like to add:
 
Would you like a personal response:
 


Acronyms Programming Software Technology Terminology Questions

Search:

  • Custom Search

Newsletter

Bookmarking:

EntreCard

Something New!

7 more days...