tor-browser

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

html_single-get-page.html (998B)


      1 <!-- Any copyright is dedicated to the Public Domain.
      2     http://creativecommons.org/publicdomain/zero/1.0/ -->
      3 <!doctype html>
      4 
      5 <html>
      6  <head>
      7    <meta charset="utf-8"/>
      8    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
      9    <meta http-equiv="Pragma" content="no-cache" />
     10    <meta http-equiv="Expires" content="0" />
     11    <title>Network Monitor test page</title>
     12  </head>
     13 
     14  <body>
     15    <p>Performing a custom number of GETs</p>
     16 
     17    <script type="text/javascript">
     18      "use strict";
     19 
     20      function get(address) {
     21        return new Promise(resolve => {
     22          const xhr = new XMLHttpRequest();
     23          xhr.open("GET", address, true);
     24 
     25          xhr.onreadystatechange = function() {
     26            if (this.readyState == this.DONE) {
     27              resolve();
     28            }
     29          };
     30          xhr.send(null);
     31        });
     32      }
     33 
     34      (async function performRequests() {
     35        await get("request_0");
     36      })();
     37    </script>
     38  </body>
     39 
     40 </html>