Page visibility
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).
Status
Baseline Widely Available (since 2018-01-29)
MDN documentation
Specifications
- HTML (#page-visibility), from HTML Workstream (WHATWG).
Browser support (view on caniuse.com)
- Chrome 33 Released on 2014-02-20
- Chrome Android 33 Released on 2014-02-26
- Edge 12 Released on 2015-07-29
- Firefox 18 Released on 2013-01-08
- Firefox for Android 18 Released on 2013-01-08
- Safari 7 Released on 2013-10-22
- Safari on iOS 7 Released on 2013-09-18
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist