News for hackers. Stuff that matters.
Re:Our Funniest Front-End Bugs (2020) by darekkay on Wednesday April 21, 2021 @09:17AM (#26889257)
I have some of my interesting debugging stories piled up on my blog drafts. One of them was the issue "script not triggered when opened in a new tab". And indeed, there was a 3rd party script on our page that was triggered on every page (re)load, but not when opened in a new tab. I was baffled at first, but the reason was rather straightforward: the injected script was using an "if (!document.hidden)" check, which wasn't passing for background tabs.

There are no comments on this comment yet.