use browsercache for gallery covers

This commit is contained in:
Robin Appelman 2011-10-02 19:42:14 +02:00
parent 7bcc0efd6a
commit 36196b6c2d
1 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,12 @@ while (($i = $result->fetchRow()) && $counter < $numOfItems) {
header('Content-Type: image/png');
$offset = 3600 * 24;
// calc the string in GMT not localtime and add the offset
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT");
header('Cache-Control: max-age=3600, must-revalidate');
header('Pragma: public');
imagepng($targetImg);
imagedestroy($targetImg);
?>