Skip to content
Snippets Groups Projects
Commit 0c24c924 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

remove pragma:no-cache header. closes #1201

The pragma header is only defined for requests not for responses. The
Cache-Control header should be used in responses.
parent f209f206
No related branches found
No related tags found
No related merge requests found
<?php
<?php
/**
* Functions used by lib/exe/fetch.php
* (not included by other parts of dokuwiki)
......@@ -47,18 +47,15 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
// cache publically
header('Expires: '.gmdate("D, d M Y H:i:s", $expires).' GMT');
header('Cache-Control: public, proxy-revalidate, no-transform, max-age='.$maxage);
header('Pragma: public');
} else {
// cache in browser
header('Expires: '.gmdate("D, d M Y H:i:s", $expires).' GMT');
header('Cache-Control: private, no-transform, max-age='.$maxage);
header('Pragma: no-cache');
}
} else {
// no cache at all
header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');
header('Cache-Control: no-cache, no-transform');
header('Pragma: no-cache');
}
//send important headers first, script stops here if '304 Not Modified' response
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment