Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. PageTransitionEvent

PageTransitionEvent

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

ThePageTransitionEvent event object is available inside handler functions for thepageshow andpagehide events, fired when a document is being loaded or unloaded.

Event PageTransitionEvent

Constructor

PageTransitionEvent()

Creates a newPageTransitionEvent object.

Instance properties

This interface also inherits properties from its parent,Event.

PageTransitionEvent.persistedRead only

Indicates if the document is loading from a cache.

Example

js
window.addEventListener("pageshow", (event) => {  if (event.persisted) {    alert("The page was cached by the browser");  } else {    alert("The page was NOT cached by the browser");  }});

Specifications

Specification
HTML
# the-pagetransitionevent-interface

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp