[英]MVC / Internet Explorer 10 defaults to Compatibility View?
I use Remote Desktop to access a Windows 8 PC. 我使用远程桌面访问Windows 8 PC。
In my MVC 4 controller, I've got this code on the first request: 在我的MVC 4控制器中,我在第一个请求上获得了以下代码:
If Request.Browser.Browser.ToLower = "ie" Then
If CDec(Request.Browser.Version.Replace(".", ",")) < 9 Then
Response.Redirect("browser_too_old.html", True)
Exit Function
End If
End If
But when I use Remote Desktop to log on to my Windows 8 PC, Internet Explorer defaults to version 7 (Compatibility View): 但是,当我使用远程桌面登录到Windows 8 PC时,Internet Explorer默认为版本7(兼容性视图):
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3) Mozilla / 4.0(兼容; MSIE 7.0; Windows NT 6.2; WOW64; Trident / 6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3)
Since I'm using controller (no webpage has yet been loaded), I can't use this: 由于我正在使用控制器(尚未加载任何网页),因此无法使用:
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" meta http-equiv =“ X-UA-Compatible” content =“ IE = edge,chrome = 1”
How do I force it to be IE10 (that is - not Compatibility View)? 如何强制将其设为IE10(即-不是兼容性视图)?
IE defaults to display local/intranet sites in compatibility mode. IE默认以兼容模式显示本地/内联网站点。
"You can change these settings from 'Tools -> Compatibility view settings' from the IE menu. Of course that menu is now sneakily hidden, so you won't see it until you press Alt." “您可以从IE菜单的“工具->兼容性视图设置”中更改这些设置。当然,该菜单现在已被隐藏起来,因此只有按Alt才能看到。
Source: Why does IE9 switch to compatibility mode on my website? 资料来源: 为什么IE9会在我的网站上切换到兼容模式?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.