mirror of
https://github.com/seigler/neat-charts
synced 2025-07-27 01:16:09 +00:00
add EXPIRES header so that browsers can use built-in caching rules
This commit is contained in:
parent
efac02515e
commit
4d78085a3c
1 changed files with 2 additions and 0 deletions
|
@ -40,6 +40,7 @@
|
|||
}
|
||||
|
||||
// if so, display cache file and stop processing
|
||||
header("Expires: ".gmdate("D, d M Y H:i:s", $last_modified_time + CACHE_TIME)." GMT");
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
|
@ -57,6 +58,7 @@
|
|||
// always send headers
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT");
|
||||
header("Etag: $etag");
|
||||
header("Expires: ".gmdate("D, d M Y H:i:s", $last_modified_time + CACHE_TIME)." GMT");
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue