Ajax refers to asynchronous java script and xml. It is not a not a programming language. Ajax is of Asynchronous type. It normally uses XML, plain text or JSON to communicate with server i.e. for data transfer.
Note: Ajax is technology independent.
How ajax works?
- An event occurs in a web page like click a button.
- JavaScript creates an XMLHttpRequest object.
- The XMLHttpRequest object sends a request to a web server.
- The server processes the request.
- The server sends a response back to the web page.
- JavaScript reads the response.
- JavaScript updates the page content.