You can try to skip loading () and use $ .ajax instead. I know load (); this is an ajax request, but I seem to recall that it retrieves the entire script. Try querying the script, do the calculations in the database, and return the data as json. I assume that you are sending the full html with the data from the database request. Try this instead of json.
You will receive data as objects, for example, such as.
{"variable":"foo"}
Then you can get the data with a simple expression.
$.ajax({ url: "links2.php", type: "POST", dataType: "json", success: function(data){
I think this should not be your memory leak and, ultimately, your browser crash, although you call it every second or so. Try it and let me know how this happens.
Good luck
Stefan konno
source share