Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-with-constant-last-modified.php

Issue 2413233003: DevTools: introduce WI.Resource.contentSize() and WI.Resource.lastModified() (Closed)
Patch Set: add tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <?php 1 <?php
2 if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) { 2 if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
3 header("HTTP/1.0 304 Not Modified"); 3 header("HTTP/1.0 304 Not Modified");
4 exit; 4 exit;
5 } 5 }
6 6
7 $max_age = 12 * 31 * 24 * 60 * 60; //one year 7 $max_age = 12 * 31 * 24 * 60 * 60; //one year
8 $expires = gmdate(DATE_RFC1123, time() + $max_age); 8 $expires = gmdate(DATE_RFC1123, time() + $max_age);
9 $last_modified = gmdate(DATE_RFC1123, time() - $max_age); 9 // Dec 01, 1989, 8:00:00AM.
10 $last_modified = gmdate(DATE_RFC1123, 628502400);
10 11
11 header("Cache-Control: public, max-age=" . 5*$max_age); 12 header("Cache-Control: public, max-age=" . 5*$max_age);
12 header("Cache-control: max-age=0"); 13 header("Cache-control: max-age=0");
13 header("Expires: " . $expires); 14 header("Expires: " . $expires);
14 header("Content-Type: text/html"); 15 header("Content-Type: text/javascript");
15 header("Last-Modified: " . $last_modified); 16 header("Last-Modified: " . $last_modified);
16 17
17 echo("console.log(\"Done.\");"); 18 echo("console.log(\"Done.\");");
18 echo("var randomValue = " . rand() . ";");
19 ?> 19 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698