Skip to content

Commit 624c794

Browse files
committed
Prevent thumbnail caching.
1 parent d001fbc commit 624c794

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/plugins/editor.diaporama/class.ImagePreviewer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public function switchAction($action, $httpVars, $filesVars)
6767

6868
header("Content-Type: ".AJXP_Utils::getImageMimeType(basename($cId))."; name=\"".basename($cId)."\"");
6969
header("Content-Length: ".strlen($data));
70-
header('Cache-Control: public');
71-
header("Pragma:");
70+
header('Cache-Control: no-cache');
71+
header("Pragma: no-cache");
7272
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10000) . " GMT");
73-
header("Expires: " . gmdate("D, d M Y H:i:s", time()+5*24*3600) . " GMT");
73+
header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
7474
print($data);
7575

7676
} else {
@@ -83,10 +83,10 @@ public function switchAction($action, $httpVars, $filesVars)
8383
$filesize = $stat["size"];
8484
header("Content-Type: ".AJXP_Utils::getImageMimeType(basename($file))."; name=\"".basename($file)."\"");
8585
header("Content-Length: ".$filesize);
86-
header('Cache-Control: public');
87-
header("Pragma:");
86+
header('Cache-Control: no-cache');
87+
header("Pragma: no-cache");
8888
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10000) . " GMT");
89-
header("Expires: " . gmdate("D, d M Y H:i:s", time()+5*24*3600) . " GMT");
89+
header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
9090

9191
$class = $streamData["classname"];
9292
$stream = fopen("php://output", "a");

0 commit comments

Comments
 (0)