tor-browser

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

expect-client-hints-headers.html (602B)


      1 <html>
      2 <body>
      3 <script>
      4 
      5 // This test checks if browser attaches the device-memory client hint in the
      6 // HTTP request headers.
      7 
      8 // resources/echo-client-hints-received.py sets the response headers depending on the set
      9 // of client hints it receives in the request headers.
     10 
     11 fetch("../resources/echo-client-hints-received.py").then(r => {
     12  if(r.status == 200 && r.headers.has("device-memory-received") && r.headers.has("device-memory-deprecated-received")) {
     13    window.top.opener.postMessage('PASS', '*');
     14  }
     15  else {
     16    window.top.opener.postMessage('FAIL', '*');
     17  }
     18 });
     19 
     20 </script>
     21 </body>
     22 </html>