Stop jQuery .load response from being cached

前端 未结 14 1917
迷失自我
迷失自我 2020-11-22 03:54

I have the following code making a GET request on a URL:

$(\'#searchButton\').click(function() {
    $(\'#inquiry\').load(\'/portal/?f=searchBilling&pid=         


        
14条回答
  •  青春惊慌失措
    2020-11-22 04:37

    Here is an example of how to control caching on a per-request basis

    $.ajax({
        url: "/YourController",
        cache: false,
        dataType: "html",
        success: function(data) {
            $("#content").html(data);
        }
    });
    

提交回复
热议问题