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

There are a few ways to do it. First is document.hidden but that's the simplest monkey patch ever. Pass through iframe can detect some monkey patches though. visibilitychange too.

you're right! at least before it was somewhat mitigated I think?, you can measure timing Chrome used to slow down inactive tabs with rounded ms I believe I'd have to check the fingerprinting JS i wrote a few years ago.

Mouse movement is a good one too.

I'm sure there are other hacks maybe onfocus the entire window and poll it.

IntersectionObserver sounds like a good thread, there is a good polyfill library too.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: