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

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: always send last-modified in php script 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"]) {
3 header("HTTP/1.0 304 Not Modified");
4 exit;
5 }
6
7 $max_age = 12 * 31 * 24 * 60 * 60; //one year 2 $max_age = 12 * 31 * 24 * 60 * 60; //one year
8 $expires = gmdate(DATE_RFC1123, time() + $max_age); 3 $expires = gmdate(DATE_RFC1123, time() + $max_age);
9 $last_modified = gmdate(DATE_RFC1123, time() - $max_age); 4 // Dec 01, 1989, 8:00:00AM.
5 $last_modified = gmdate(DATE_RFC1123, 628502400);
10 6
11 header("Cache-Control: public, max-age=" . 5*$max_age); 7 header("Cache-Control: public, max-age=" . 5*$max_age);
12 header("Cache-control: max-age=0"); 8 header("Cache-control: max-age=0");
13 header("Expires: " . $expires); 9 header("Expires: " . $expires);
14 header("Content-Type: text/html"); 10 header("Content-Type: text/javascript");
15 header("Last-Modified: " . $last_modified); 11 header("Last-Modified: " . $last_modified);
16 12
17 echo(rand()); 13 echo("console.log(\"Done.\");");
18 ?> 14 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698