How to set cache: false in jQuery.get call

前端 未结 7 481
天涯浪人
天涯浪人 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:56

    Add the parameter yourself.

    $.get(url,{ "_": $.now() }, function(rdata){
      console.log(rdata);
    });
    

    As of jQuery 3.0, you can now do this:

    $.get({
      url: url, 
      cache: false
    }).then(function(rdata){
      console.log(rdata);
    });
    
    0 讨论(0)
提交回复
热议问题