📜 ⬆️ ⬇️

ajax.net vs jquery.ajax

In my previous article on the jQuery blog, I described the mechanism for invoking .net web methods through the jQuery library. After that, the question arose, is there a difference in the use of ajax.net and jquery, and if so, what is it? Here I will try to answer this question.

For testing, I put together a project consisting of two pages and one web service. On one page, the service was called via ajax.net, on the second through jQuery.ajax. The project code can be downloaded from this link:

file link

The test results were not like I imagined. Ajax.net actually showed itself well and not at all as I expected. It turned out that in easy cases this library can create light code.
')
Here are the results:

AJAX.NET



jQuery



Findings.

As you can see the size of the content from ajax.net is only 28 kb more than the jQuery version. What is not so much, and I think it is quite acceptable. Another thing is that jQuery, in contrast to ajax.net, will provide, in addition to ajax calls, a sea of ​​other functionality, and ajax.net will grow by leaps and bounds, for example, using the ajax control toolkit library. In addition, it is clear that ajax.net generates 4 requests to the server, which is also more than one request that is needed for jQuery to work.

Conclusions for yourself.

- use ajax.net for easy code and call web services is quite acceptable;
- jQuery still generates a smaller volume;
- I prefer jQuery, due to the fact that this library provides much more functionality for programming logic on the client side.

Source: https://habr.com/ru/post/27092/


All Articles