i have specific problem for firefox. When i change the page, i call load jQuery function
$("#all").load("test.php", function() {
testFunction(); //this function will call Restfull-API, get some
});
This is test.php:
<div class="pageContent">
<div class="testPage">
<div id="link">
</div>
<div id="imageDiv">
<img id="image"/>
</div>
<div id="middleContent">
<div id="test">
</div>
<div id="info">
</div>
</div>
<div id="link_bottom">
</div>
</div>
</div>
this is testFunction() which i call when page is loaded
function ajaxRequestGetAllianceInfo() {
$.ajax({
type: "GET",
dataType: "json",
url: "./ajax_request/test.php",
data: {},
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus + ": " + errorThrown);
},
success: function(data){
drawTestPage(data);
}
});
}
and on the end we have function for change image src in loaded page:
function drawAlliancePage(data){
$("#imageDiv #image").prop("src",data.image);
}
and look what i get: http://prntscr.com/iqs885, this first image not exist in inspect element. if i click on the right side: http://prntscr.com/iqs8sh or change tab in firefox and when i come back to my tab top image is not exist (this is correct because i need to have only 1 image) on chrome this works correct. I don't know why firefox "cache" this old load html data. Any idea how to fix this? For some page i get this problem for some other page all is works fine.
P.S. This not helps Prevent browser caching of jQuery AJAX call result