I need to perform semi-continuous AJAX requests to display data based on the latest entry into a DB. This all works fine with a setInterval() but now I notice the continuously increasing number of resources and size in the Web Inspector (see image). I imagine that this may become an issue if the app is open for long periods of time? Or is the size displayed (1) merely network activity? How could I prevent this? I have set the jQuery ajax cache to false.
Update: Did not post any code because there's nothing special there. Just a basic jQuery ajax function, php script that queries DB based on data from the ajax function and echoes it back in a response.
So is the number of KB in the Web Inspector (1) network traffic or cached?
$(document).ready(function(){
setInterval(refresh, 2000);
})
function refresh(){
$.ajax({
type: "POST",
cache: false,
url: "../update.php",
data: dataString,
success: function(msg){
if(msg2 == 'same'){
// do nothing
}else{
$('#result').html(msg);
}
}
})
}