16

So there's this relatively new facility provided by most browsers called the Page Visibility API, wherein pages can tell when they're actually visible. Lots of sites have taken advantage of this not to reduce load or shut up when they're not being dealt with or other good stuff, but to enforce their requirement that you look at them before they'll do something you wanted them to do. Usually for a minimum amount of time, as well — a whole new level of forced ads. I imagine a lot of them also use this to further intrude on my privacy by tracking my behavior even more finely than before.

In short: how can I disable this mess? How can I have the browser pretend to the page that it's always visible (or, perhaps, always hidden, or maybe even that the API simply isn't implemented)? On a per-site basis would be ideal, but a simple global setting would be more than welcome as well.

I'm particularly interested in Firefox, but I think we'd all like to know for other browsers too.

Mike Koch
  • 1,421
  • 11
  • 19
Atario
  • 1,228
  • 2
  • 10
  • 18
  • I'm not sure how these sites detect availability of this API (by the way, an example site would be *great*) but you could try changing your user agent to a version older than the API. – Bob May 12 '12 at 02:25
  • 1
    StackOverflow has [the technical details](http://stackoverflow.com/q/1060008/393280) of how to enable this on your site. – palswim Feb 21 '13 at 20:04
  • If its just ads that's bothering you, why not use adblock? – tumchaaditya Jan 31 '14 at 17:13

2 Answers2

2

I can't personally take credit for this, but a contributor at StackOverflow created a Chrome extension that disables the PageVisibility API.

https://stackoverflow.com/questions/18928417/spoof-or-disable-the-page-visibility-api

eXceLon
  • 61
  • 4
0

Firefox only lets you disable Javascript entirely which I don't think you want to do. the Ghostery plugin selectively disables Javascripts that are in their database for tracking you. As an experiment, you could install Ghostery or look for some other plugins that allow blacklisting certain types of Javascript, and test it on a site that you know uses the feature you described.

Bryan
  • 758
  • 8
  • 23