PageTransitionEvent persisted Property
Example
Find out whether the page was cached by the browser:
function myFunction(event) {
alert(event.persisted);
}
Try it Yourself »
Description
The persisted property returns a Boolean value that indicates if the webpage is loaded directly from the server, or if the page is cached, when an onpageshow or onpagehide event occurs.
This property is read-only.
Syntax
event.persisted
Technical Details
Return Value: |
A Boolean, indicating whether the webpage is loading from a cache.
Possible values:
|
---|
Related Pages
HTML DOM reference: The onpageshow Event
Browser Support
event.persisted
is a DOM Level 3 (2004) feature.
It is fully supported in all modern browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |