The Page #Visibility API is useful for the Web application to know whether it is currently displayed on the front or not, especially to stop resource-intensive UI animations or data refreshing when it is not needed. On the mobile devices, the primary reason for that is to reduce the battery usage.
https://whatwebcando.today/foreground-detection.html
https://whatwebcando.today/foreground-detection.html
WhatWebCanDo
What Web Can Do Today: Foreground Detection
Can I rely on the Web Platform features to build my app? An overview of the device integration HTML5 APIs.