| OLD | NEW |
| 1 <?php setcookie("Purpose", $_SERVER["HTTP_PURPOSE"]); | 1 <?php |
| 2 | 2 echo "Purpose: " . $_SERVER["HTTP_PURPOSE"]; |
| 3 if (isset($_COOKIE['Purpose'])) { | |
| 4 setcookie("Purpose", "", time() - 3600); | |
| 5 echo "<h1>The cookie was set!</h1>"; | |
| 6 echo "<p>Purpose: "; | |
| 7 echo $_COOKIE['Purpose']; | |
| 8 } else { | |
| 9 echo "<h1>BAD BROWSER NO COOKIE</h1>"; | |
| 10 } | |
| 11 ?> | 3 ?> |
| 12 | 4 |
| 13 <script> | 5 <script> |
| 14 testRunner.notifyDone(); | 6 testRunner.notifyDone(); |
| 15 </script> | 7 </script> |
| 16 | 8 |
| 17 <p>This test verifies that prefetches are sent with the HTTP request header | 9 <p>This test verifies that prefetches are sent with the HTTP request |
| 18 <b>Purpose: prefetch</b>. To do this, the root page has a prefetch | 10 header <b>Purpose: prefetch</b>. To do this, the root page has a |
| 19 link targetting this subresource which contains a PHP script | 11 prefetch link targetting this subresource which contains a PHP script |
| 20 (resources/prefetch-purpose.php). That initial prefetch of this | 12 (resources/prefetch-purpose.php). The PHP prints the value of the |
| 21 resource sets a cookie. Later, the root page sets window.location to | 13 Purpose header into the document. Later, the root page sets |
| 22 target this script, which verifies the presence of the cookie, and | 14 window.location to target this script, which should have "Purpose: |
| 23 generates the happy test output that you hopefully see right now. | 15 prefetch" in its output if it's served from cache. |
| 24 | |
| OLD | NEW |