Tag Archive | "refresh data without page refresh"

Tags: , , , , , , ,

What is AJAX and how does it Work?

Posted on 05 February 2012 by Moki

First thing that you need to know about Ajax is that it is to be used by those that already have at least some working knowledge of HTML/XHTML, CSS and Javascript/DOM. Ajax stands for “Asynchronous Javascript and XML and is a not a language but technique used to create dynamic and fast webpages.

Ajax allows a developer to create pages that are updated asyncronously by sending and recieving small amounts of data through the server in the background. This means you can reload data on the page without actually reloading the page itself. Some examples of sites that use AJAX to create this type of features are Google Maps, Youtube and Facebook tabs. In fact the AJAX method was made popular in 2005 being used with Google Suggest.

How does AJAX work?

  1. Browser creates an XMLHttpRequest object and sends it
  2. Server processes the HTTPRequest, creates a response and sends the new data back to the browser
  3. Browser processes the returned data using Javascript and updates the pages content.

Keep in mind that AJAX applications are ran within the browser and are OS independant. AJAX uses internet standards and uses a combination of XMLHttpRequest objects to exchange the data as stated above, Javascript/DOM to display and interact with the information, CSS to style the data and XML generally is used as the format to transfer the data.

Comments (0)