blob: f0a41dc58628fb4ca348d11c9eae6a1f71217294 [file] [log] [blame]
<h1></h1>
<script src="random-max-age.cgi"></script>
<script>
// Random.cgi will include a global "randomNumber".
// Always send this back to our opener.
opener.postMessage(randomNumber, '*');
// Our opener will tell us to perform various loads.
window.addEventListener('message', function(event) {
// Go forward and back.
if (event.data === 'go-forward-and-back') {
window.location = 'history-back.html';
return;
}
// Reload.
if (event.data === 'reload') {
window.location.reload();
return;
}
// Normal navigation, next.
if (event.data === 'next') {
window.location = 'max-age-resource-next.html';
return;
}
}, false);
</script>