mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 20:26:32 +01:00
Merge branch 'w46_MDL-36487_m24_ieheaders' of git://github.com/skodak/moodle
This commit is contained in:
commit
2d910d0464
@ -56,6 +56,7 @@ $relroot = preg_replace('|^http.?://[^/]+|', '', $CFG->wwwroot);
|
||||
|
||||
$htmllang = get_html_lang();
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
header('X-UA-Compatible: IE=edge');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php echo $htmllang ?>
|
||||
|
@ -88,6 +88,8 @@ if ($mimetype === 'application/x-javascript' && $allowcache) {
|
||||
}
|
||||
|
||||
$file = $cachefile;
|
||||
} else if ($mimetype === 'text/html') {
|
||||
header('X-UA-Compatible: IE=edge');
|
||||
}
|
||||
|
||||
// Serve file.
|
||||
|
@ -37,6 +37,7 @@ $plugin = $editor->get_plugin('moodleemoticon');
|
||||
|
||||
$htmllang = get_html_lang();
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
header('X-UA-Compatible: IE=edge');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php echo $htmllang ?>
|
||||
|
@ -253,6 +253,7 @@ function install_print_help_page($help) {
|
||||
global $CFG, $OUTPUT; //TODO: MUST NOT USE $OUTPUT HERE!!!
|
||||
|
||||
@header('Content-Type: text/html; charset=UTF-8');
|
||||
@header('X-UA-Compatible: IE=edge');
|
||||
@header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
@header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
@header('Pragma: no-cache');
|
||||
@ -299,6 +300,7 @@ function install_print_header($config, $stagename, $heading, $stagetext) {
|
||||
global $CFG;
|
||||
|
||||
@header('Content-Type: text/html; charset=UTF-8');
|
||||
@header('X-UA-Compatible: IE=edge');
|
||||
@header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
@header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
@header('Pragma: no-cache');
|
||||
|
@ -182,6 +182,7 @@ if (defined('WEB_CRON_EMULATED_CLI')) {
|
||||
if (file_exists("$CFG->dataroot/climaintenance.html")) {
|
||||
if (!CLI_SCRIPT) {
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
header('X-UA-Compatible: IE=edge');
|
||||
/// Headers to make it not cacheable and json
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
|
@ -1540,6 +1540,7 @@ width: 80%; -moz-border-radius: 20px; padding: 15px">
|
||||
|
||||
// better disable any caching
|
||||
@header('Content-Type: text/html; charset=utf-8');
|
||||
@header('X-UA-Compatible: IE=edge');
|
||||
@header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
@header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
@header('Pragma: no-cache');
|
||||
|
@ -1849,6 +1849,10 @@ function send_headers($contenttype, $cacheable = true) {
|
||||
@header('Content-Script-Type: text/javascript');
|
||||
@header('Content-Style-Type: text/css');
|
||||
|
||||
if (empty($CFG->additionalhtmlhead) or stripos($CFG->additionalhtmlhead, 'X-UA-Compatible') === false) {
|
||||
@header('X-UA-Compatible: IE=edge');
|
||||
}
|
||||
|
||||
if ($cacheable) {
|
||||
// Allow caching on "back" (but not on normal clicks)
|
||||
@header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
||||
|
Loading…
x
Reference in New Issue
Block a user