From 360c2b648a220d93a5efd2e8f471d99a401175bd Mon Sep 17 00:00:00 2001 From: byt3h3ad Date: Fri, 1 Mar 2024 20:09:24 +0530 Subject: [PATCH] new: visibility-of-browser-document.md --- javascript/visibility-of-browser-document.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 javascript/visibility-of-browser-document.md diff --git a/javascript/visibility-of-browser-document.md b/javascript/visibility-of-browser-document.md new file mode 100644 index 0000000..4e23633 --- /dev/null +++ b/javascript/visibility-of-browser-document.md @@ -0,0 +1,6 @@ +# Be informed of when a browser document is visible + +A browser's `visibilityState` property is an essential aspect of web development that plays a crucial role in optimizing user experience and resource management in web applications. This property is part of the [Page Visibility API](https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API), a web standard that provides developers with the ability to determine the current visibility state of a webpage. + +The concept of visibility state revolves around whether a webpage is in a "visible" or "hidden" state. When a user navigates to a different tab, minimizes the browser window, or locks the screen, the webpage becomes "hidden". Conversely, when the webpage is in the foreground, and the user actively interacts with it, the state is "visible". +