i

PHP Tutorial

AJAX Introduction

AJAX stands for Asynchronous JavaScript and XML. It is a technique which is used to request data from a remote server without reloading the entire page. AJAX is not a programming language rather a technique used by web developers to make the websites behave like a desktop application. HTML, CSS, JavaScript, XML, and JSON, and PHP are involved in AJAX where HTML and CSS are used at client side. JavaScript is used to make a request, XML and JSON are the formats for the request. PHP is used at the server side for AJAX requests.

Asynchronous means that we are exchanging the data like requesting the data from the server or posting the data to the server in the background without refreshing the page. In the standard client-server application, the client has to wait for the server response to execute other tasks on the webpage. In Standard AJAX application, multiple requests can happen simultaneously, and the client doesn’t have to wait for a response from the server to make a new request. 

Responses in AJAX application are handled in the form of callback that is a special function used in AJAX via which server can respond to the client whenever it is ready to send data to the client.