Commit 117b50ee authored by Nigel McNie's avatar Nigel McNie
Browse files

By default, send headers to immediately expire a page.

Apache configuration and other scripts can override this. For example, thumb.php overrides this to cache thumbnail images for a while.

This prevents IE making assumptions that pages are cachable when they're clearly not.
parent e95875e5
......@@ -38,6 +38,11 @@ else {
set_include_path($CFG->libroot . PATH_SEPARATOR . $CFG->libroot . 'pear/' . PATH_SEPARATOR . get_include_path());
// Ensure that, by default, the response is not cached
header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');
header('Expires: '. gmdate('D, d M Y H:i:s', 507686400) .' GMT');
header('Pragma: no-cache');
// Set up error handling
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment