blob: d826f1742b504c767d35fe3f06a323e6061c3f49 [file] [log] [blame]
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page 2</title>
This page is a middle man for referrer tests.
This page will include a link to a "next" page if the <code>next</code> query
parameter, or the <code>document.referrer</code> is set.
<p><input type="button" id="forward" value="Forward" onclick="history.go(1)"/>
<script>
var match = document.location.search.match(/next=(.*)/);
var next = document.referrer || '';
if (match && match.length == 2) {
next = decodeURIComponent(match[1]);
}
if (next) {
var link = document.createElement('a');
link.innerText = 'Next!';
link.textContent = 'Next!';
link.id = 'next';
link.href = next;
document.body.appendChild(link);
}
</script>