简体   繁体   English

IIS 在浏览站点时将 IE11 文档模式从 11(默认)更改为 7(默认)

[英]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.

相关问题 IE11中的文档模式 - Document mode in IE11 当文档模式为Edge时,IE11中的ReportViewer高度问题 - ReportViewer height issue in IE11 when document mode is Edge IE11切换到文档模式:IE7标准 - IE11 switching to Document Mode: IE7 Standards 在IE9中使用文档模式IE7正常工作的网站在使用IE7标准作为文档模式的IE11中存在问题 - Website which worked fine in IE9 with Documents Mode IE7 is having issues in IE11 with IE7 Standard as Document Mode 当IE浏览器模式= 11和文档模式= 7时出现问题 - Issues when IE browser mode =11 and document mode=7 Internet Explorer 11默认文档查看模式为Edge - Internet Explorer 11 default document view mode to Edge IE11始终在本地托管的网站上以文档模式EDGE渲染页面 - IE11 always render page in Document mode EDGE on locally hosted website ajaxToolkit:MaskedEditExtender + Delete和Backspace不适用于IE11,但适用于ie11兼容模式 - ajaxToolkit:MaskedEditExtender + Delete and Backspace not working for Ie11 but working ie11 compatible mode 使用ie11时未定义dopostback - dopostback not defined when using ie11 onunload和onbeforeunlad事件在IE11和IIS中无法正常工作 - onunload and onbeforeunlad events not working as expected in IE11 and IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM