3 ms·
I already don't really like how websites can detect whether a tab is active or not (perhaps because callbacks/timers get delayed when a tab is inactive?). For e
by nyanpasu64 5y ago
I already don't really like how websites can detect whether a tab is active or not (perhaps because callbacks/timers get delayed when a tab is inactive?). For example, dslreports's speedtest fails your measurement if you switch tabs, and Duo's web 2FA interface fails to approve a device which you've set to remember for 30 days if you're in a different tab.
- dillondoyle 5y agoThere 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.
- Isthatablackgsd 5y agoDo you have a clue of how to prevent or disable the active/focus/blur tab events as an end-user? Like going to uBlock Origin route or something? There is one portal that heavily used this event calls and I don’t mind. The issue if I want to generate a report or sending queries/message, I have to be on that tab for them to process it. They often take 10 seconds to 1 min to process it. If I leave the tab, I have to restart the process again. It is disruptive to my workflow since I have to be on that tab for it to do something. I wonder if there is a way to generate a fake/mock event to fool the portal that the tab is active while I am looking in another tab?
- AdmiralAsshat 5y agoYou know who loves to use this feature? Recaptcha! When browsing Firefox in Incognito mode with uBlock Origin and uMatrix fully active, the Recaptcha challenges load painfully slowly. Like each picture might take upwards of five seconds to refresh. And to my delight, I have noticed that if I flip away from that tab while the panels are refreshing, they pause until I bring the tab back into active focus. It's a slap in the face that this kind of user-hostile design is allowed.
- bityard 5y agoI see the same thing on the chase.com web site. When I log into my account, it starts up some react or angular type bullcrap that takes literally 5-10 seconds to fully load no matter what computer I'm on or what browser I'm in. If I switch away to another tab to do something else while it's doing that, _it will never fully load_. The only option is to sit there with the tab open and stare at it until my account information appears. In 2021, I guess I should just be happy that they're not showing me ad while wasting my time.
- sys_64738 5y agoI actually use a dedicated browser for the likes of banks. Firefox is what I use for it only. All else I use Vivaldi.
- krono 5y agoFYI Access to device sensor data is enabled by default on Chrome and Edge.