I actually found the culprit in that he had several ajax requests, each of which ran every few seconds to check whether the server is still or not (this is a long story, but it needs to be done). Then I found a small solution to save memory on the Internet: put all ajax requests into a variable, and then clear the variable after use (I also cleared java-script unused variables for all applications). The following is an example:
function getData(){
var request = $.ajax({
url : "/someurl",
type : "HEAD",
dataType : "json",
success : function(data) {
}
error: function(){
},
cache : false
});
data = null;
request.onreadystatechange = null;
request.abort = null;
request = null;
}
setTimeout(function(){
getData();
}, 0.05 * 60 * 1000)
}
PS I found the code online.
source
share