简体   繁体   中英

Internet Explorer 11 X-UA-Compatible IE=edge not working

I have a website that adds a header on each page of X-UA-Compatible IE=EmulateIE9 due to some browser compatibility issues. I am adding some newer pages that no longer need this. The new pages follow other pages with the IE9 header. I add a header for the new pages of X-UA-Compatible IE=edge. But when the new page is rendered by Internet Explorer, it is still treating it as IE9 and not IE11. This doesn't happen when I run from localhost. It only happens when I run the website from another web server. I experience this on both Internet and Intranet.

Here are the headers:

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"

I've also tried using the HTML to force the rendering of IE 11:

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="HeadTag">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

I've checked to make sure that the website isn't running in Compatibility Mode. And there aren't any web.config settings that add headers. Any ideas why Internet Explorer ignores the IE11 setting?

You've got the header and the meta tag in place, so everything should be okay.

My guess is the site is listed in your Enterprise compatibility list.

This is a feature in IE11 that you can use to force a site into a specific compatibility mode regardless of any other considerations like the X-UA-Compatibility tag or local browser settings. This list is intended for enterprise users so that they can force a site into a particular mode using an enterprise-wide config.

See more about this here: https://msdn.microsoft.com/en-us/library/dn872481.aspx

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