diff --git a/lib/editor/tinymce/plugins/dragmath/dragmath.php b/lib/editor/tinymce/plugins/dragmath/dragmath.php index e2b74dac64d..57ce3d9ac99 100644 --- a/lib/editor/tinymce/plugins/dragmath/dragmath.php +++ b/lib/editor/tinymce/plugins/dragmath/dragmath.php @@ -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'); ?> diff --git a/lib/editor/tinymce/plugins/loader.php b/lib/editor/tinymce/plugins/loader.php index 7ca35ced624..071c48148f5 100644 --- a/lib/editor/tinymce/plugins/loader.php +++ b/lib/editor/tinymce/plugins/loader.php @@ -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. diff --git a/lib/editor/tinymce/plugins/moodleemoticon/dialog.php b/lib/editor/tinymce/plugins/moodleemoticon/dialog.php index 39bf1ac9149..d26d8ebe24b 100644 --- a/lib/editor/tinymce/plugins/moodleemoticon/dialog.php +++ b/lib/editor/tinymce/plugins/moodleemoticon/dialog.php @@ -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'); ?> diff --git a/lib/installlib.php b/lib/installlib.php index bc6f90223e0..7b8cca2c312 100644 --- a/lib/installlib.php +++ b/lib/installlib.php @@ -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'); diff --git a/lib/setup.php b/lib/setup.php index 1e7c439ab95..90c5c73962e 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -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); diff --git a/lib/setuplib.php b/lib/setuplib.php index ace9c430e91..33894adc14b 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -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'); diff --git a/lib/weblib.php b/lib/weblib.php index 6be03c9b2dd..8bdf838c9bc 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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');