Page Visibility API
Essential for pausing animations/video, reducing network requests, and saving state when the user navigates away. Analytics and session tracking depend on visibility events to measure actual engagement time.
What It Defines
Defines document.visibilityState ('visible', 'hidden') and the visibilitychange event for detecting when a page is in the foreground or background. Fired when the user switches tabs, minimizes the browser, or locks the screen.
Canonical (Normative)
Convenient (Practical)
Publishes web platform specs including CSS, accessibility, security policies, Service Workers, Web App Manifest, and many browser APIs. Also maintains some versioned HTML/DOM specs.
Related Specs
The data source behind Core Web Vitals (LCP, FID/INP, CLS), RUM (Real User Monitoring), and performance debugging. PerformanceObserver is the modern API; the older performance.timing is deprecated.
The spec behind every HTML page, form, and browser API. The canonical reference for how browsers actually parse and process HTML.