3 ms·
I tried using the page visibility API to refresh displayed data when the user returned to the page after being away for a while. It's more efficient than needle
by spiffytech 4y ago
I tried using the page visibility API to refresh displayed data when the user returned to the page after being away for a while. It's more efficient than needlessly polling when no one's around to see.
I discovered a bunch of these edge cases and had to abandon the approach - it just wasn't reliable. The page would fail to recognize departure + return in too many scenarios and so wouldn't refresh.