Remove hardcoded headers Expires and Last-Modified to enable course content caching in order to improve performance

remotes/angel/1.11.x
David Nos 9 years ago
parent ef6dc7d2b1
commit efcc8fca08
  1. 6
      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');

Loading…
Cancel
Save