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



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

Answer / 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

More jQuery Interview Questions

Why is the block display style used for animations?

0 Answers  


List browser related issues for jquery?

0 Answers  


Tell me how to executed jquery selectors? : jquery mobile

0 Answers  


How can you delay document.ready until a variable is set?

0 Answers  


Define cache paremeter of jquery ajax method?

0 Answers  


What is jquery a client or server scripting?

0 Answers  


Have any of your startup projects failed dismally - if so, why and how did you learn from them?

0 Answers  


What is jquery.holdready() function?

0 Answers  


What are deferred and promise object in jQuery?

1 Answers  


Which are the fastest selectors in jquery? : jquery mobile

0 Answers  


Can you please explain the difference between .js and .min.js? : jquery mobile

0 Answers  


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

0 Answers  


Categories