Our volunteers haven't translated this article into 한국어 yet. Join us and help get the job done!
You can also read the article in English (US).

Page transition events fire when a webpage is being loaded or unloaded.

DOM Information

 

Inheritance Hierarchy

 Event
   PageTransitionEvent

Example

HTML

<!DOCTYPE html>
<html>
<body onpageshow="myFunction(event)">
</body>
</html>

JavaScript

function myFunction(event) { 
    if (event.persisted) {
        alert("The page was cached by the browser");
    } else {
        alert("The page was NOT cached by the browser");
    }
}

Members

The PageTransitionEvent object has these types of members:

Properties

The PageTransitionEvent object has these properties.

Property Access type Description

persisted

Read-only

Indicates if a webpage is loading from a cache.

 

문서 태그 및 공헌자

 이 페이지의 공헌자: Chandler0415, kscarfone, fscholz, teoli, rabimba
 최종 변경: Chandler0415,