简体   繁体   中英

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. I have set the computer local IE11 browser to default to document mode 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. Because of this my JavaScript does not work. 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?

As far as I know, the IIS will not control the client-browser's version. The IIS is just a server hosted tool.

If you want to let the client browser to use the IE11, I suggest you could try to use meta tag.

This tag will tell the browser to choose which IE version to load the whole page. You could add below codes into the page's header.

<meta http-equiv="X-UA-Compatible" content="IE=11"> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM