tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

iframe-prefetch-transfer-size.html (651B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5  <meta charset="utf-8" />
      6  <title>Iframe Transfer Size Prefetch</title>
      7 </head>
      8 
      9 <body>
     10  <p>Placeholder</p>
     11  <script>
     12    const urlToPrefetch = 'blank_page_prefetch.html';
     13 
     14    function addLink() {
     15      return new Promise(resolve => {
     16        const link = document.createElement('link');
     17        link.onload = function () { resolve(); };
     18        link.rel = 'prefetch';
     19        link.as = 'document';
     20        link.href = urlToPrefetch;
     21        document.body.appendChild(link);
     22      });
     23    };
     24 
     25    function navigateToPrefetchedUrl() {
     26      document.location.href = urlToPrefetch;
     27    }
     28  </script>
     29 </body>
     30 
     31 </html>