I am seeing a major memory leak within Firefox and IE on my below code. To be fair, it could very well be my poor implementation and it needs changing, to allow Firefox and other browsers to garbage collect.
Does anyone have any suggestions on how to tweak the code to allow for a more efficient way of refreshing the page?
<input type="checkbox" onclick="sel1()" id="AutoRefresh">
<script type="text/javascript">
function sel1(){
var ref = document.getElementById('AutoRefresh').checked;
if(ref == true) {
setInterval(function(){
document.getElementById('dataRefreshButton').click(); }, 2000);
}
window.alert("Auto refresh on");
}
</script>