Remove X-UA-Compatible meta tag in all browsers except IE 11

This commit is contained in:
Kijin Sung 2024-10-27 22:59:12 +09:00
parent bf0093b56a
commit 9c92ad1f05
2 changed files with 6 additions and 1 deletions

View file

@ -196,6 +196,12 @@ class HTMLDisplayHandler
Context::set('favicon_url', $favicon_url);
Context::set('mobicon_url', $mobicon_url);
// Only print the X-UA-Compatible meta tag if somebody is still using IE
if (preg_match('!Trident/7\.0!', $_SERVER['HTTP_USER_AGENT'] ?? ''))
{
Context::addMetaTag('X-UA-Compatible', 'IE=edge', true);
}
return $output;
}