1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24

content / test / data / performance_timeline / prefetch.html [blame]

<html>

<head>
  <meta charset="utf-8" />
  <title>Navigation Timing 2 Transfer Size Prefetch</title>
</head>

<body>
  <script>
    const urlToPrefetch = "../title1.html";
    function addPrefetch() {
      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);
      });
    }
  </script>
</body>

</html>