[英]IIS changing the IE11 document mode from 11 (Default) to 7 (Default) when browsing to a site
I have an ASP .NET application that requires Document Mode to default to IE11.我有一个需要文档模式默认为 IE11 的 ASP .NET 应用程序。 I have set the computer local IE11 browser to default to document mode IE11.
我已将计算机本地 IE11 浏览器设置为默认为文档模式 IE11。 The problem I have is when I deploy my ASP .NET site to IIS and browse to the site the Document Mode gets changes back to IE7 Default.
我遇到的问题是,当我将 ASP .NET 站点部署到 IIS 并浏览到该站点时,文档模式将更改回 IE7 默认值。 Because of this my JavaScript does not work.
因此,我的 JavaScript 不起作用。 How do I set the IE11 Document mode to IE11 default when I browse to the site and not change it back to IE7 default?
浏览站点时如何将 IE11 文档模式设置为 IE11 默认值而不将其更改回 IE7 默认值?
As far as I know, the IIS will not control the client-browser's version.据我所知,IIS 不会控制客户端浏览器的版本。 The IIS is just a server hosted tool.
IIS 只是一个服务器托管工具。
If you want to let the client browser to use the IE11, I suggest you could try to use meta tag.如果你想让客户端浏览器使用IE11,我建议你可以尝试使用meta标签。
This tag will tell the browser to choose which IE version to load the whole page.这个标签会告诉浏览器选择哪个 IE 版本来加载整个页面。 You could add below codes into the page's header.
您可以将以下代码添加到页面的标题中。
<meta http-equiv="X-UA-Compatible" content="IE=11">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.