How to set cache: false in jQuery.get call

前端 未结 7 512
天涯浪人
天涯浪人 2020-11-28 04:07

jQuery.get() is a shorthand for jQuery.ajax() with a get call. But when I set cache:false in the data of the .get() call

7条回答
  •  庸人自扰
    2020-11-28 04:39

    I think you have to use the AJAX method instead which allows you to turn caching off:

    $.ajax({
      url: "test.html",
      data: 'foo',
      success: function(){
        alert('bar');
      },
      cache: false
    });
    

提交回复
热议问题