Ajax, short for Asynchronous JavaScript and XML (and sometimes also referred to as AJAX), is a group of interrelated web technologies that allow for dynamic updates in a web page without requiring a full reload. It enables developers to create interactive web applications with https://ajax-casino.ca rich user interfaces by allowing asynchronous communication between the client-side browser and server.
The term “Ajax” was coined by Jesse James Garrett, a well-known developer, who introduced it as part of his 2005 book “Creating Passionate Users.” Initially, Ajax consisted of three main components: JavaScript, XMLHttpRequest (XHR), and XML or other data formats. Later on, more technologies were added to the mix, including HTML Canvas for vector graphics, CSS3 Transitions, and the JSON format.
The core idea behind Ajax is to update parts of a web page without requiring a full reload by sending an asynchronous request from JavaScript code embedded in the client-side browser back to the server. This allows developers to create interactive experiences where users can input data or take other actions on a web page while the system dynamically responds without changing the overall layout.
From its initial introduction, Ajax has been extensively used for building modern web applications. One notable example is Google Maps, which revolutionized geographical mapping and navigation when it first appeared in 2005 using cutting-edge JavaScript technology at that time – part of what would become known as the Ajax approach to Web development. Today, virtually all major websites use some form of asynchronous updates.
The Role of XMLHttpRequest (XHR)
XMLHttpRequest is an API available within JavaScript for making HTTP requests from a client-side script to a server without requiring the user’s full web page reload. This involves sending and receiving data in various formats including but not limited to, XML (Extensible Markup Language), JSON (JavaScript Object Notation) and HTML.
When a request is sent via XMLHttpRequest, it can be either synchronous or asynchronous depending on whether you are using sync or async XHR for sending the request. If you choose to use the traditional synchronous method of making HTTP requests with XMLHttpRequests – most web developers discourage this unless absolutely necessary due to limitations such as blocking your website’s UI from updating.
Working With XmlHttpRequest (XHR)
One way an application might make a postback call using XHR in modern JavaScript is shown below:
var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status==200) { // state “4” means completed var resp= xhr.responseText; alert(resp); } }; xhr.open(‘POST’, ‘server_side_script.php’); xhr.send(data);
Above, we’re making a POST call to a remote server script called “server_side_script.php”. XHR allows us in client-side JavaScript to perform several things:
- Requesting and sending data
- Retrieving or getting data
- Receiving responses from servers
XMLHttpRequests is only one component of the web technologies often referred to as Ajax; modern programming languages also leverage new APIs – like Fetch API, which provides a more efficient alternative with better performance compared to traditional XHR.
Differences and Alternatives To XmlHttp Request
Over time other techniques for sending asynchronous requests were developed. Some newer alternatives have replaced the XMLHttpRequest object in JavaScript development environments due to its limitations or because developers prefer an easier-to-use option available on their platform. A number of alternative APIs such as fetch() API has been built into JavaScript.
Here are some main points about these differences:
1. Fetch Api
2.. Modern Web Applications
3… Browser Support

Recent Comments