Ajax allows building server connections in the background while a user is interacting with a Web front-end. These connections can be created asynchronously, that the user need not wait until the server replies. AJAX concedes you to send only important information to the server not the entire page, so only valuable data from the client side is routed to the server side. It makes your application interactive and faster
Features of AJAX
The attractive feature of AJAX is it make web page faster, it allows it load the particular part of the website not the whole page.
- It make web page faster.
- Independent of server technology.
- Increase the Performance of web page.
- No need to pushing on a submit button and reloading the complete website.
- No need to reload the whole page only some part of page is reloaded which is required to reload.
- Using AJAX develop faster and more interactive web applications.
- Not require to completely reload page due to this server use less bandwidth.
Technology Related to AJAX
- HTML is used to build Web forms and identify fields for use in the rest of your application.
- DHTML, or Dynamic HTML, helps you update your forms dynamically. You’ll use div, span, and other dynamic HTML elements to mark up your HTML.
- Asynchronous data retrieval using XMLHttpRequest.
- Data interchange and manipulation using XML and XSLT.
Ideas with AJAX
- Dynamically update the page without enforcing the user to click Update and wait for the server to resend the entire page.
- Increase site performance by reducing the amount of data downloaded from the server
- Eliminate page refreshes every time there is user input
- Edit table data directly in place, without requiring the user to navigate to a new page to edit the data.
Working of AJAX
var xmlHttp = new XMLHttpRequest();
- Change values on the form
- Parse HTML and XML
Finishing off with the DOM
Benefits of AJAX
- Callbacks:Ajax is used to implement a callback, making a quick round trip to and from the server to retrieve and/or save data without posting the entire page back to the server.
- Making Asynchronous Calls: Ajax allows you to make asynchronous calls to a web server
- User-Friendly: Because a page postback is being eliminated, Ajax enabled applications will always be more responsive, faster and more user-friendly.
- Increased Speed:The main purpose of Ajax is to improve the speed, performance and usability of a web application