I have following ajax call with me which is written in jquery: which takes continuous response from controller in json format and displays it on screen by setting values (Not there in following code).
$(function() {
$(".master_status").hide();
setInterval(
function() {
$.ajax({
type : "Get",
url : "getDeviceInfo.htm",
success : function(response) {
if(response != null){
}
} ,
error : function(e) {
}
});
}, 500);
}
And I am getting data from controller in every half second. But sometimes it shows previous state data for a fraction of second. I traied cache:false, in ajax call and increasing and decreasing interval time but still problem exists. Any suggestions?