What is Ajax?

The term Ajax (or AJAX) stands for Asynchronous Javascript And XML. Ajax is commonly used in web sites and applications. It allows Javascript on the web page to send and retrieve information from a server in the “background”. With the use of Ajax a page can be completely (or almost completely) dynamic. In many cases it can eliminate the need for a user to refresh the web page or change pages at all.

Here are a few examples where Ajax would come in handy:

  • A dating website where users can chat with one another.
  • A sports page that displays game plays as they happen.
  • Part of an in-browser game of chess that shows each player’s moves as they happen.
  • A reporting application that refreshes a report or loads a new report when a user clicks a button, without having to refresh or change the entire web page.
  • A registration form that checks the new user name against the server database and then tells the user if the name is taken already, all within a second of them entering their choice, and again without having to reload the entire webpage.

Entire applications can be written to work with a single webpage, the user never having to wait for page loads. Ajax methods can be written out manually, or what I suggest would be to use something that has been tried and tested by many many people. jQuery is an incredible Javascript library that includes Ajax functionality, among other things.