I have a timer that counts down every second. It works great until the user opens up 3 or 4 tabs of the my site, at which point the newest tab's timer goes double or triple speed. I can currently only reproduce the bug in IE8. I was previously using setInterval, and could reproduce the bug in Firefox as well.
I'm actually using FBJS (Facebook's Javascript), so I'll just give some pseudocode.
function countDown() {
...
setTimeout(function() { countDown() }, 1000);
}
countDown();
However, what I'm really looking for is more theoretical. I know browsers can try and play "catch up" with setInterval, but how can multiple tabs cause this behaviour for setTimeout?