From efcc8fca0875272247ed6491e32fe09e997f52ba Mon Sep 17 00:00:00 2001 From: David Nos Date: Tue, 31 May 2016 15:20:24 +0200 Subject: [PATCH] Remove hardcoded headers Expires and Last-Modified to enable course content caching in order to improve performance --- main/inc/lib/document.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php index 78d8699b6d..9ed8955ad7 100755 --- a/main/inc/lib/document.lib.php +++ b/main/inc/lib/document.lib.php @@ -364,8 +364,10 @@ class DocumentManager $content_type = self::file_get_mime_type($filename); $lpFixedEncoding = api_get_configuration_value('lp_fixed_encoding'); - header('Expires: Wed, 01 Jan 1990 00:00:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + // Comented to let courses content to be cached in order to improve performance: + //header('Expires: Wed, 01 Jan 1990 00:00:00 GMT'); + //header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + // Commented to avoid double caching declaration when playing with IE and HTTPS //header('Cache-Control: no-cache, must-revalidate'); //header('Pragma: no-cache');