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;
}

View file

@ -8,7 +8,6 @@
<meta name="generator" content="Rhymix">
<meta name="viewport" content="{{ config('mobile.viewport') ?? HTMLDisplayHandler::DEFAULT_VIEWPORT }}" />
<meta name="csrf-token" content="{!! \Rhymix\Framework\Session::getGenericToken() !!}" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@foreach (Context::getMetaTag() as $val)
@if ($val['is_before_title'])
<meta http-equiv="{{ $val['name'] }}"|if="$val['is_http_equiv']" name="{{ $val['name'] }}"|if="!$val['is_http_equiv']" content="{{ $val['content'] }}" />