javascript - Continuous AJAX requests increasing resource count and size -
i need perform semi-continuous ajax requests display data based on latest entry db. works fine setinterval() notice continuously increasing number of resources , size in web inspector (see image). imagine may become issue if app open long periods of time? or size displayed (1) merely network activity? how prevent this? have set jquery ajax cache false.
update: did not post code because there's nothing special there. basic jquery ajax function, php script queries db based on data ajax function , echoes in response.
so number of kb in 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'){ // nothing }else{ $('#result').html(msg); } } }) }
Comments
Post a Comment