blob: 5e84680d01d56315044daae109a6aa937c6b4d19 [file] [log] [blame]
<html>
<head>
<title>Preloader</title>
<script src="prerender_events_common.js"></script>
<script>
function UnloadHandler() {
// Signal to the browser the unload happened by hitting a URL. Must
// be synchronous so the request isn't cancelled.
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://unload-url.test', false);
xhr.send();
}
addEventListener('unload', UnloadHandler, false);
</script>
</head>
<body>
<script>
AddPrerender('REPLACE_WITH_PRERENDER_URL', 0);
</script>
</body>
</html>