How many times have you had a browser session running with multiple tabs? As a developer, I would expect that to almost be the norm, right?
Now, what if when you switched tabs, content was still playing on the original tab? It's really irritating, right? Sure, we could stop it, but hey, we're busy people with more important things to do…!
Thankfully, this is no longer an issue – in the age of mobile, where conservation of resources is ever more important, we can employ a few tricks to help curb our use. This chapter will introduce you to using the Page Visibility API, and show you how, with some simple changes, you can dramatically reduce the resources used by your site. Over the next few pages, we will cover the following topics:
Ready to make a start? Good! Let's get going...