Difference between $.ajax(); and $.ajaxSetup();

后端 未结 5 1453
温柔的废话
温柔的废话 2020-12-01 04:18

What is the difference between $.ajax(); and $.ajaxSetup(); in jQuery as in:

$.ajax({
    cache:false
});

and

5条回答
  •  一向
    一向 (楼主)
    2020-12-01 04:54

    The first one disables cache on a per request basis, the second one sets it up to be disabled globally by default for all AJAX functions.

提交回复
热议问题