What is the difference between Ajax and jQuery-Ajax methods in jQuery?
Firstly, let’s go through what is Ajax and why it is used.
It has the following points, which shows its importance.
- XML is commonly used as the format for receiving server data, although any format, including plain text, can be used.
- AJAX is a web browser technology independent of web server software.
- A user can continue to use the application while the client program requests information from the server in the background.
jQuery has several methods for AJAX functionality, which is why it is called jQuery-Ajax. Request, HTML, XML, JSON from a remote server using both HTTP Get and HTTP Post, with it. Let us see some of these methods:
|S.No||Method & Description|
|1.||jQuery.ajax( options ) |
Load a remote page using an HTTP request.
|2.||jQuery.ajaxSetup( options ) |
Setup global settings for AJAX requests.
|3.||jQuery.get( url, [data], [callback], [type] |
Load a remote page using an HTTP GET request.
|4.||jQuery.getJSON( url, [data], [callback] ) |
Load JSON data using an HTTP GET request.
jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. It has the following features,
- DOM manipulation - jQuery made it easy to select DOM elements, traverse them and modifying their content by using cross-browser open source selector engine called Sizzle.
- Event handling - jQuery offers an elegant way to capture a wide variety of events, such as a user clicking on a link, without the need to clutter the HTML code itself with event handlers.
- AJAX Support - jQuery helps you a lot to develop a responsive and feature-rich site using AJAX technology.
- Animations - jQuery comes with plenty of built-in animation effects which you can use in your websites.
- Lightweight - jQuery is very lightweight library - about 19KB in size ( Minified and gzipped ).
- Cross Browser Support - jQuery has cross-browser support, and works well in IE 6.0+, FF 2.0+, Safari 3.0+, Chrome and Opera 9.0+
Published on 22-Dec-2017 12:29:32