Hacker News new | ask | show | jobs
by dmitriid 1402 days ago
IIRC this comes down to disagreements between browser vendors as to what is and what isn't potentially harmful (for a wide definition of harmful) detection of user behavior.

I don't remember the details, but expect browsers to differ on details of this API basically forever.

1 comments

Why isn't the user in charge of whether they want the page visibility api to report them?
How do you imagine the UI for managing that? Don't forget that there are a dozen other APIs with permissions as well.
I would imagine the UI to be similar to permission for microphone or camera. There's a default, and a per-site that a user can just override to disable visibility api checks (aka, a page would always think it is visible if set by the user).
But then there are multiple details in what activity the visibility API may expose. From the article:

- Browser window minimized

- browser window covered by another window that is larger

- tab hidden in an active browser window

- docking/undocking a tab to a browser window

- switched to a different desktop

- Browser window covered by another browser window that is the same size or smaller

- show desktop via F11 or swipe on touchpad

- opening Launchpad

- opening Mission Control

- dragging the window in Mission Control

- browser dialogs (print, save, etc.)

- during animation to/from full screen

- ...

The blanket "yes/no" setting isn't nearly enough for these kinds of things. And, again, there are dozens of APIs that require user permission in one way or another.

> The blanket "yes/no" setting isn't nearly enough for these kinds of things.

why not?

These are all things the current underlying implementation checks for, and report via the visibility api, which is just a boolean effectively.

The user should be able to set a toggle, where the visibility api will return "true" (aka visible), for all of these underlying checks that the browser does. E.g., the visibilityChange event does not fire when user sets the toggle to true.

> why not?

Because some of them are harmless, some of them are less harmless. Same goes for all the other APIs that require user permissions. In the end the user will just click "yes" on all of them.

> The user should be able to set a toggle, where the visibility api will return "true" (aka visible), for all of these underlying checks that the browser does.

Does the user know what those checks are? Did you know which checks the visibility API does before reading the article? I sure as hell didn't.

> E.g., the visibilityChange event does not fire when user sets the toggle to true.

This has unintended consequences. For example, a well-meaning website performing intensive computation only when the page is visible.

An inscrutable power-user feature to appease some privacy purist nerds, all while the 99.999% leaves it set to the default behaviour and gets screwed by ad companies. That’s not fighting for privacy, it’s copping out.