What is the difference between ajax and jquery and which one is better?

I am confused about using ajax or jquery, so I want to know what the differences are and which one is better, like performance and complexity.

+83
jquery ajax
May 31 '09 at 11:54
source share
8 answers

AJAX is an XMLHttpRequest (out-of-band Http request) method from a web page to the server and sending / receiving data to be used on the web page. AJAX stands for Asynchronous Javascript and XML. It uses javascript to build XMLHttpRequest, usually using different methods in different browsers.

jQuery ( site ) is javascript that simplifies working with the DOM by creating many high-level functions that can be used to search and interact with the DOM. Some jQuery functions implement a high-level interface for executing AJAX requests. jQuery implements this interface abstractly, protecting the developer from the complexity of supporting multiple browsers when executing a query.

+170
May 31 '09 at 11:59
source share

In StackOverflow, clicking the up-voice button is AJAX, while you type your question or answer and see that it appears in the live preview below, it's JavaScript (JQuery).

This means that the difference between AJAX and Javascript is that AJAX allows you to communicate with the server without refreshing the page (i.e. moving to a new page), while JavaScript (JQuery) allows you to embed logic and behavior on your page, Of course , with this logic you also create AJAX.

+150
May 31 '09 at 12:00
source share

A simpler English explanation: jQuery is what makes the task of AJAX and other JavaScript easier.

+18
May 31 '09 at 14:08
source share

Ajax is a technology / paradigm, while jquery is a library (which provides - among other nice features - a convenient wrapper around ajax) - so you cannot compare them.

+16
May 31 '09 at 11:56
source share

This is really not a “situation”. AJAX stands for A synchronous J avaScript a nd X ML, and JQuery is a JavaScript library that takes the pain out of writing generic JavaScript routines.

This is the difference between a thing (jQuery) and a process (AJAX). For comparison, they would compare apples and oranges.

+12
May 31 '09 at 11:57 a.m.
source share

AJAX is a way to send information between a browser and a server without refreshing the page. This can be done with or without a library, such as jQuery .

The library is easier.

Here is a list of JavaScript libraries / frameworks commonly used in AJAX development.

+8
May 31 '09 at 12:26
source share

They are not comparable.

Ajax (asynchronous Javascript and XML) is a subset of javascript. Ajax is a way a client browser interacts with a server (for example: retrieving data from a database) without having to refresh the page.

jQuery is a javascript library that standardizes the differences between JavaScript browsers. jQuery includes some ajax features.

+5
May 31 '09 at 12:05
source share

Ajax is a way to use Javascript to communicate with servers without reloading the page. jQuery uses ajax for many of its functions, but it is nothing but a library that provides lighter functionality.

With jQuery you do not need to think about creating xml objects, etc., everything is done for you, but with direct javascript-ajax you need to program each individual step of the ajax call.

+1
May 31 '09 at 11:58 a.m.
source share



All Articles