I have a code similar to this (shortened it for brevity):
function reload() {
location.reload();
}
window.addEventListener('load', function () {
foo();
setInterval(reload, 20 * 1000);
})
This creates an indirect loop which works fine at first, but simply stops after a while. I'm not a Javascript expert, would appreciate any explanation anyone can offer. Thanks!