Is there any advantage of using $.ajax() for ajax call against $.get() or $.post()?

Answer Posted / chaitanya

By using jQuery post()/ jQuery get(), you always trust the response from the server and you believe it is going to be successful all the time. Well, it is certainly not a good idea to trust the response. As there can be n number of reason which may lead to failure of response.

Where jQuery.ajax() is jQuery's low-level AJAX implementation. $.get and $.post are higher-level abstractions that are often easier to understand and use, but don't offer as much functionality (such as error callbacks). Find out more here.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is numeric in jquery?

625


Tell me how to use migrate jquery plugin if possible? : jquery mobile

605


Is jquery still relevant 2019?

689


What is .remove()? : jquery mobile

603


Differentiate between width() vs css(‘width’) in jquery

594


Tell me how to select combobox select value and text using jquery?

594


Describe the two types of cdns?

653


Where jquery mobile works? : jquery mobile

602


What is $('div')? : jquery mobile

565


How to use connect in jquery?

632


How to call a method inside code-behind using jquery?

614


What is the use of val() method in jquery?

660


How can we apply css in div using jquery?

669


Explain remove class jquery with example?

590


How to validate email using jquery?

615