HTML5 Page Visibility API

With the launching of this API we have welcomed two new document property which does two different functions. The first one is document.visibilityState and second one is document.hidden.

document.visibilityState holds four different values which are as below:

  • hidden: Page is not visible on any screen
  • prerender: Page is loaded off-screen and not visible to user
  • visible: Page is visible
  • unloaded: Page is about to unload (user is navigating away from current page)

Full article on–cms-22021