i have a javascript to parse twitter feeds and show them in a block in my page every 30 seconds, the code is something like this:
var auto_refresh = setInterval( function () { //get twitter feeds }); }, 30000);
now in case the user minimized his browser or switched to another tab (page is not active) i want to disable this auto_referesh clearInterval(auto_refresh);
Thanks for your help