blob: 471a318477d25be12292ff27bc392ef203dfd673 [file] [log] [blame]
<html>
<head>
<script>
function pageShown(evt)
{
if (evt.persisted)
alert("pageshow event handler called. The page was just restored from the Page Cache.");
else
alert("pageshow event handler called for the initial load. This is the same as the load event.");
}
function pageHidden(evt)
{
if (evt.persisted)
alert("pagehide event handler called. The page was suspended and placed into the Page Cache.");
else
alert("pagehide event handler called for page destruction. This is the same as the unload event.");
}
window.addEventListener("pageshow", pageShown, false);
window.addEventListener("pagehide", pageHidden, false);
</script>
<body>
<a href="http://www.webkit.org/">Click for WebKit</a>
</body>
</html>