tor-browser

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

009-5.html (769B)


      1 <!doctype html>
      2 <html>
      3        <head>
      4                <title>history.pushState/replaceState and referer headers</title>
      5        </head>
      6        <body>
      7 
      8                <noscript><p>Enable JavaScript and reload</p></noscript>
      9                <div id="log"></div>
     10                <script type="text/javascript">
     11 var httpReferer = unescape("{{headers[referer]}}");
     12 var lastUrl = location.href.replace(/\/[^\/]*$/,'\/009-4.html?2345');
     13 parent.test(function () {
     14        parent.assert_equals( httpReferer, lastUrl );
     15 }, 'HTTP Referer should use the replaced state');
     16 parent.test(function () {
     17        parent.assert_equals( document.referrer, lastUrl );
     18 }, 'document.referrer should use the replaced state');
     19 parent.done();
     20                </script>
     21 
     22        </body>
     23 </html>