Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Iframe Transfer Size Prefetch</title>
</head>
<body>
<p>Placeholder</p>
<script>
const urlToPrefetch = 'blank_page_prefetch.html';
function addLink() {
return new Promise(resolve => {
const link = document.createElement('link');
link.onload = function () { resolve(); };
link.rel = 'prefetch';
link.as = 'document';
link.href = urlToPrefetch;
document.body.appendChild(link);
});
};
function navigateToPrefetchedUrl() {
document.location.href = urlToPrefetch;
}
</script>
</body>
</html>