Beginner's guide to AJAX

You all might be familiar with PHP. So today let me introduce you to a fun tool AJAX. AJAX is basically a technique for creating fast and dynamic web pages. So AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. So this is a Beginner’s guide to AJAX.

Now let’s dive into an introductory guide to using AJAX. So for that start your notepad++ or visual studio code and I will explain to you how to use AJAX along the way.

  • AJAX stands for Asynchronous JavaScript and XML. XML stands for an extensible markup language.
  • Classic web pages, (which do not use AJAX) must reload the entire page if the content should change. Examples of applications using AJAX are; Google Maps, Gmail, Youtube, and Facebook tabs. As well as the core component of AJAX is the XMLHttpRequest object. AJAX uses XMLHttpRequest object for asynchronously exchanging XML data between client and server. Different browsers use different methods to create the XMLHttp Request object. Internet Explorer uses an ActiveX object, while other browsers use an XMLHttpRequest object.

The states of server response are:-

  • The request has been create but not initialized.
  • Represents a “setup” state. The request has been sent to the server open() method.
  • Represents “sent” state. The request has been sent to the server send() method.
  • Represents a “receiving” state. The user request is in process and is waiting for a response.
  • Represents a “loaded” state. Request processing is complete and the response is completely receive.

How Ajax works with PHP

Beginner's guide to AJAX
Beginner’s guide to AJAX

Introduction to JQuery

jQuery is a fast and concise JavaScript Library created by John Resig in 2006 with a nice
motto: Write less, do more.
• Event handling − JQuery offers an elegant way to capture a wide variety of events, such as a user clicking on a link, without the need to clutter the HTML code itself with event handlers.
• AJAX Support − JQuery helps you a lot to develop a responsive and feature-rich site using
AJAX technology.

for more knowledge visit here-:

By Sharma

Leave a Reply

Your email address will not be published. Required fields are marked *