Web features explorer

Page transition events

Widely available
Tags: api

The pageshow and pagehide transition events fire when a document loads or unloads due to a navigation, such as clicking on a link on a page or the back button in a browser. To learn more, see PageTransitionEvent, PageTransitionEvent: PageTransitionEvent() constructor, PageTransitionEvent: persisted property, Window: pagehide event, Window: pageshow event at MDN.

Compatibility (view on caniuse.com)