Web features explorer

Page visibility

Widely available since 2018-01-29
Tags: api

The document.visibilityState and document.hidden properties tell you whether the page is visible to the user (for example, it's not minimized or in a background tab).

Learning resources on MDN

Browser support (view on caniuse.com)

Specifications