PageTransitionEvent.persisted

The persisted read-only property indicates if a webpage is loading from a cache.

Syntax

window.addEventListener('pageshow', function(event) {
  if (event.persisted) {
    console.log('Page was loaded from cache.');
  }
});

Value

A Boolean.

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'PageTransitionEvent: persisted' in that specification.
Living Standard Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
persistedChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support 11
Notes
Full support 11
Notes
Notes The persisted property is known to be buggy in Internet Explorer. It is advised to check if window.performance.navigation.type == 2 as well.
Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support
Full support
See implementation notes.
See implementation notes.