The Javascript in my web page (updated using AJAX) is causing symptoms like memory leaks on client machines. The memory usage continues to rise until the browser freezes. I have isolated it to the bit of code shown below. Does anything here stand out as a reason fom memory not to be released? Many thanks in advance.
Code:
function ajaxLoaderVWSF(url) {
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(url);
}
if (x) { // got something back
x.onreadystatechange = function() {
//main fuction goes here
}
x.open("GET", url, true);
x.send(null);
if ( (maxupdates == 0) || (updates < maxupdates-1)) {
setTimeout("ajaxLoaderVWSF(flashFile + '?' + new Date().getTime())", reloadTime);
}
}
}
Comment