• in Javascript

    Visibility.js is a nice-looking javascript wrapper for the Page Visibility API that also provides high-level timers and initialisers that take page visibility into account.


    https://github.com/ai/visibility.js


    These are techniques which all javascript-heavy websites should start employing imho. There's no reason why every browser tab you have open should be consuming CPU cycles when they're not visible. If you add them all together for everyone on the planet, it would probably equate to a lot of global warming!
    • visibility.js

      visibility.js - Visibility.js - a wrapper for the Page Visibility API

    • Rowan Manning
      Rowan Manning
      This is useful, I can see it being handy for reducing unnecessary network traffic when your site/app is inactive