Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there a simple way in javascript to tell if a tab is currently visible in a browser?


http://stackoverflow.com/questions/1760250/how-to-tell-if-br...

But that can still lead to inaccurate measurements of "time on opage" if the user switches back and forth between tabs. Do you only measure the periods during which the tab is active (and if so, how granular?) or do you simply subtract the first active timestamp from the last active timestamp?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: