Currently when unloading a document, we would fire pagehide before running “unloading document visibility change steps” (which includes updating visibilityState and firing the visibilitychange event if needed). We will swap this ordering, so that we would first run “unloading document visibility change steps” before firing pagehide.


Updating visibility before firing pagehide simplifies Page Lifecycle state transitions, as this will guarantee that a page will always get into the “hidden” state before transitioning into the “terminated” or “frozen” state. See proposal for more details. This is also consistent with the pageshow event: we will run “session history document visibility change steps” before firing pageshow.



Status in Chromium


In development

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Positive
  • No signal
  • No signals


Last updated on 2022-01-21