From 36196b6c2d68ba7de74b8314743539b043325198 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 2 Oct 2011 19:42:14 +0200 Subject: [PATCH] use browsercache for gallery covers --- apps/gallery/ajax/getCovers.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/gallery/ajax/getCovers.php b/apps/gallery/ajax/getCovers.php index d56bf6fa4b7..ebda8d3e47f 100644 --- a/apps/gallery/ajax/getCovers.php +++ b/apps/gallery/ajax/getCovers.php @@ -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); ?> -- 2.39.5