由于某些浏览器兼容性问题,我有一个网站在X-UA-Compatible IE = EmulateIE9的每个页面上添加了标题.我正在添加一些不再需要它的新页面.新页面跟随IE9标题的其他页面.我为X-UA-Compatible IE = edge的新页面添加了一个标题.但是当新页面由Internet Explorer呈现时,它仍然将其视为IE9而不是IE11.当我从localhost运行时,这不会发生.它只发生在我从另一个Web服务器运行网站时.我在Internet和Intranet上都经历过这种情况.
以下是标题:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-UA-Compatible: IE=edge
X-AspNet-Version: 4.0.30319
p3p: CP="NON OTPa OUR NOR STA"
Run Code Online (Sandbox Code Playgroud)
我也尝试使用HTML来强制IE 11的渲染:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="HeadTag">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Run Code Online (Sandbox Code Playgroud)
我已经检查过以确保网站没有在兼容模式下运行.并且没有任何添加标头的web.config设置.任何想法为什么Internet Explorer忽略IE11设置?