Page Visibility API: Learn How to Use Browser-Based Visibility Interfaceby@mozilla
211 reads

Page Visibility API: Learn How to Use Browser-Based Visibility Interface

by Mozilla Contributors5mMay 25th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The Page Visibility API is especially useful for saving resources and improving performance by letting a page avoid performing unnecessary tasks when the document isn't visible. Pages only become hidden when the user switches tabs or minimizes the browser window containing the tab. API sends a visibilitychange event to let listeners know the state of the page has changed. API provides events you can watch for to know when a document becomes visible or hidden, as well as features to look at the current visibility state. API is available in modern browsers (Firefox 58+ Chrome 57+)

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Page Visibility API: Learn How to Use Browser-Based Visibility Interface
Mozilla Contributors HackerNoon profile picture
Mozilla Contributors

Mozilla Contributors

@mozilla

Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.

About @mozilla
LEARN MORE ABOUT @MOZILLA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Mozilla Contributors HackerNoon profile picture
Mozilla Contributors@mozilla
Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite