diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-10-02 19:42:14 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-10-02 19:42:14 +0200 |
commit | 36196b6c2d68ba7de74b8314743539b043325198 (patch) | |
tree | 73258466bce5a65be485f20b978c3c9d5a8f4276 /apps | |
parent | 7bcc0efd6a3688b04bcdda94f7cc920a044e442f (diff) | |
download | nextcloud-server-36196b6c2d68ba7de74b8314743539b043325198.tar.gz nextcloud-server-36196b6c2d68ba7de74b8314743539b043325198.zip |
use browsercache for gallery covers
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gallery/ajax/getCovers.php | 6 |
1 files changed, 6 insertions, 0 deletions
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); ?> |