| OLD | NEW |
| (Empty) |
| 1 <?php | |
| 2 header("cache-control: no-store"); | |
| 3 ?> | |
| 4 <script> | |
| 5 | |
| 6 function nextTest() { | |
| 7 if (window.sessionStorage.https_in_page_cache_started) | |
| 8 delete window.sessionStorage.https_in_page_cache_started; | |
| 9 location = "https://127.0.0.1:8443/navigation/resources/https-in-page-ca
che-2.php"; | |
| 10 } | |
| 11 | |
| 12 window.onpageshow = function(evt) { | |
| 13 if (evt.persisted) { | |
| 14 alert("The page was restored from the page cache. It should NOT
have been. Running part 2 of the test."); | |
| 15 nextTest(); | |
| 16 } | |
| 17 } | |
| 18 | |
| 19 window.onload = function() { | |
| 20 if (window.sessionStorage.https_in_page_cache_started) { | |
| 21 alert("The page was reloaded on back, not from the page cache. G
ood job. Running part 2 of the test."); | |
| 22 nextTest(); | |
| 23 return; | |
| 24 } | |
| 25 | |
| 26 alert("This page is https and has the no-store cache-control directive.
It should NOT go in to the page cache."); | |
| 27 window.sessionStorage.https_in_page_cache_started = true; | |
| 28 setTimeout('window.location = "go-back.html"', 0); | |
| 29 | |
| 30 } | |
| 31 | |
| 32 </script> | |
| OLD | NEW |