News for hackers. Stuff that matters.
Re:Reddit vs Hacker News vs Twitter by joejohnson on Tuesday March 06, 2012 @03:32PM (#3672724)
Is there a simple way in javascript to tell if a tab is currently visible in a browser?
Re:Reddit vs Hacker News vs Twitter by kijin on Tuesday March 06, 2012 @05:13PM (#3673183)
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?