From 0c24c9242169cfbb3e5dd68f8b094624a2c971f3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Wed, 15 Jul 2015 20:49:07 +0200 Subject: [PATCH] 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. --- inc/fetch.functions.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index c99fbf20a..b8e75eaec 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -1,4 +1,4 @@ -<?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 -- GitLab