Ajax Introduction

free php tutorials, php classes, php utilities, free tools
  • AJAX stands for Asynchronous JavaScript and XML.
  • AJAX is a technique for creating fast and dynamic web pages.
  • AJAX is a type of programming made popular in 2005 by Google.
  • AJAX is not a new programming language, but a new way to use existing standards.
  • AJAX is a technique for creating fast and dynamic web pages.
  • AJAX is based on JavaScript and HTTP requests.

AX is Based on Internet Standards

AJAX is based on internet standards, and uses a combination of:

  • XMLHttpRequest object (to exchange data asynchronously with a server)
  • JavaScript/DOM (to display/interact with the information)
  • CSS (to style the data)
  • XML (often used as the format for transferring data)

  AJAX applications are browser- and platform-independent!

How Ajax Works

When user first visits the page, the Ajax engine is initialized and loaded. From that point of time user interacts with Ajax engine to interact with the web server. The Ajax engine operates asynchronously while sending the request to the server and receiving the response from server. Ajax life cycle within the web browser can be divided into following stages:

 

  1. Web browser requests for the content of just the part of the page that it needs.
  2. Web server analyzes the received request and builds up an XML message which is then sent back to the Web browser.
  3. Once Web browser receives the XML message, it parses the message in order to update the content of that part of the page.

AJAX uses JavaScript language through HTTP protocol to send/receive XML messages asynchronously to/from Web server. Asynchronously means that data is not sent in a sequence.

Benefits of Ajax

Ajax is new technology, which has become extremely popular these days. Ajax has following benfits:

  • Ajax can be used for creating rich, web-based applications that look and works like a desktop application
  • Ajax is easy to learn. Ajax is based on JavaScript and existing technologies like XML, CSS, DHTML. etc. So, its very easy to learn Ajax
  • Ajax can be used to develop web applications that can update the page data continuously without refreshing the whole page

Bookmark This Page