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

What is meant by the term ‘theming’ in jquery mobile? : jQuery Mobile

0 Answers  


Can you call C# code-behind method using jQuery? If yes,then how?

1 Answers  


Consider a scenario where things can be done easily with javascript, would you still prefer jQuery?

1 Answers  


How do I pull a native DOM element from a jQuery object?

0 Answers   MCN Solutions,


How to prevent Right Click option using jquery?

0 Answers  






Write the code to define a requirejs module with its dependencies.

0 Answers  


What is the use of queue() in jquery?

0 Answers  


How do you select element by ID in jQuery?

1 Answers  


Explain the script build up by jquery?

0 Answers  


Is jquery a w3c standard? : jquery mobile

0 Answers  


What is jquery.noconflict? Explain

0 Answers  


What is the advantage of using protocol less URL while referencing jQuery from CDNs?

1 Answers  


Categories