- 4 years ago
- Zaid Bin Khalid
- 3,719 Views
-
5
In this session, you will learn what Ajax is and how it works with the help of an example.
What is Ajax
Asynchronous JavaScript and XML is known as Ajax. The main purpose of Ajax is loading data from the server to the web browser without reloading the whole page.
The Ajax use the JavaScript-based XMLHttpRequest object. This is used to send and receive information. Also, do not interfere with the user’s experience too and from a web server in the background.
Typically, Ajax is not a new technology Ajax is not a technology at all. Ajax is just a term that describes the process. The process exchanging data from a web server asynchronously through JavaScript, without refreshing a page.
Ajax is became so popular that most applications are using Ajax. You can hardly find any application that does not use or support Ajax. For instance, Gmail, Google Maps, Google Docs, YouTube, Facebook, Flickr and many more.
Ajax with jQuery
Different browser support or use the Ajax differently. This means if you are using the typical JavaScript way to use the Ajax. You must have to write the different code for different browsers to ensure that Ajax could work cross-browser.
But, in jQuery, it simplifies the process of using Ajax by taking care of those browser differences. It offers simple and easy methods such as load ( ), $.get( ), $post ( ). etc. to implement the Ajax. This method works the same in all browsers.
In the upcoming sessions, you will know and learn how to load data from the server. Also, how to send and receive data using the HTTP GET and POST method through jQuery Ajax.
Ajax request or works as a triggered by the JavaScript code. Your code request send to a URL. Hence, when the request completes, a callback function can be triggered to handle the response.
- 4 years ago
- Zaid Bin Khalid
- 3,719 Views
-
5