Add cache headers
--HG-- extra : rebase_source : 3598ab0524d7dfee1f28581de3ec1f95ca65fe66
This commit is contained in:
parent
74c5abce0b
commit
3b50b96d83
|
@ -46,6 +46,10 @@ try {
|
||||||
$data = preg_replace_callback ("/(href=)[\"']([^:]*?)[\"']/", $callback, $data);
|
$data = preg_replace_callback ("/(href=)[\"']([^:]*?)[\"']/", $callback, $data);
|
||||||
$data = preg_replace_callback ("/(\@import\s+)[\"'](.*?)[\"'];/", $callback, $data);
|
$data = preg_replace_callback ("/(\@import\s+)[\"'](.*?)[\"'];/", $callback, $data);
|
||||||
|
|
||||||
|
$expires = 60*60*24*14;
|
||||||
|
header("Pragma: public");
|
||||||
|
header("Cache-Control: maxage=".$expires);
|
||||||
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
|
||||||
header ("Content-Type: " . $book->componentContentType($component));
|
header ("Content-Type: " . $book->componentContentType($component));
|
||||||
echo $data;
|
echo $data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue