Makes sure statusCode callbacks are ordered in the same way success and error callbac...
[jquery.git] / test / data / if_modified_since.php
1 <?php
2 error_reporting(0);
3
4 $ts = $_REQUEST['ts'];
5
6 $ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : false;
7 if ($ifModifiedSince == $ts) {
8     header('HTTP/1.0 304 Not Modified');
9     die; // stop processing
10 }
11
12 header("Last-Modified: " . $ts);
13
14 if ( $ifModifiedSince ) {
15         echo "OK: " . $ts;
16 } else {
17         echo "FAIL";
18 }
19
20 ?>