Search This Blog

AJAX tutorial for beginners

AJAX stands for Asynchronous JAvaScript and XML.

Why one should learn AJAX ? 

AJAX is an art of exchanging data with a server and updating parts of a web page, without reloading the entire webpage.

  1. It is widely used in creating interactive web applications.
  2. It decreases the loading time with which the webpage responds faster.
  3. It uses XML for content and CSS for presentation, as well as the Document Object Model and JavaScript for dynamic content display.
  4. Applications are browser and platform independent.
XML is commonly used as the format for receiving server data, although any format, including plain text, can be used. A user can continue to use the application while the client program requests information from the server in the background.

How AJAX works in 3 steps?
When an event occurs, create an XMLHttpRequest object and send it to sever.
Server process the XMLHttpRequest and creates the responsive date and sends to browsers.
Browser reads the returned data from server using javascript and updates the webpage content.