ChatGPT解决这个技术问题 Extra ChatGPT

X-UA-Compatible is set to IE=edge, but it still doesn't stop Compatibility Mode

I am quite confused. I should be able to set

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

and IE8 and IE9 should render the page using the latest rendering engine. However, I just tested it, and if Compatibility Mode is turned on elsewhere on our site, it will stay on for our page, even though we should be forcing it not to.

How are you supposed to make sure IE does not use Compatibility Mode (even in an intranet)?

FWIW, I am using the HTML5 DocType declaration (<!doctype html>).

Here are the first few lines of the page:

<!doctype html> 
<!--[if lt IE 7 ]> <html lang="en" class="innerpage no-js ie6"> <![endif]--> 
<!--[if IE 7 ]>    <html lang="en" class="innerpage no-js ie7"> <![endif]--> 
<!--[if IE 8 ]>    <html lang="en" class="innerpage no-js ie8"> <![endif]--> 
<!--[if (gte IE 9)|!(IE)]><!--> 
<html lang="en" class="innerpage no-js"> 
<!--<![endif]--> 
    <head> 
        <meta charset="ISO-8859-1" /> 
        <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 

EDIT: I just learned that the default setting on IE8 is to use IE7 compatibility mode for intranet sites. Would this override the X-UA-Compatible meta tag?

I'm having this problem too with some of my users, did you ever figure this out? My app isn't intranet though. And only like 20% of the users get it, strangely.
This might be the result of your funny <html> tag markup (the <!--[if lt IE 7 ]> stuff). Try removing it and see if it works. See this SO question stackoverflow.com/questions/10682827/…
@SundayIronfoot FYI, the funny tag markup you refer to is conditional IE comments that is used to add a CSS class to the element for the appropriate version of IE (if applicable) so you can style things differently as needed for the IE versions by simply prefixing your style declaration with ".ie7 ", like: .ie7 p { width: 200px; } ... it's a cleaner work around for rendering issues in older IE versions than having to use some of the CSS hacks like *width or _width. Browsers other than IE will ignore it and just use the basic one.

K
KyleMit

If you need to override IE's Compatibility View Settings for intranet sites you can do so in the web.config (IIS7) or through the custom HTTP headers in the web site's properties (IIS6) and set X-UA-Compatible there. The meta tag doesn't override IE's intranet setting in Compatibility View Settings, but if you set it at the hosting server it will override the compatibility.

Example for web.config in IIS7:

<system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-UA-Compatible" value="IE=EmulateIE8" />
      </customHeaders>
    </httpProtocol>
</system.webServer>

Edit: I removed the clear code from just before the add; it was an unnecessary oversight from copying and pasting. Good catch, commenters!


Just a note though... If you're developing using the built-in Visual Studio development web server (a.k.a. Cassini), then this won't work because Cassini doesn't honor the section of the web.config. So, for development, use IIS Express instead.
What's the reason for the <clear />? What custom headers are cleared by this?
The clear seems to remove the <urlCompression...> rule at least for me. That rule does gzipping, which I do want so I commented out the clear. Any further information would be lovely.
I removed the 'clear' - good catch, it was an unnecessary line from copying and pasting from my implementation.
PHP: <?php header('X-UA-Compatible: IE=edge'); ?>
C
Community

Server Side solution is the recommended one, as @TimmyFranks proposed in his answer, but if one needs to implement the X-UA-Compatible rule on the page level, please read the following tips, to benefit from the experience of the one who already got burned

The X-UA-Compatible meta tag must appear straight after the title in the <head> element. No other meta tags, css links and js scripts calls can be placed before it.

<head>
    <title>Site Title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <script type="text/javascript" src="/jsFile.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <link rel="shortcut icon" href="/apple-touch-icon.png" />
</head>

If there are any conditional comments in the page (lets say located in the <html>), they must be placed under, after the <head>.

// DON'T: place class inside the HTML tag 
<!--[if gt IE 8]><!--> 
    <html class="aboveIe8"> 
<!--<![endif]-->

// DO: place the class inside the BODY tag
<!--[if gt IE 8]><!--> 
    <body class="aboveIe8"> 
<!--<![endif]-->

Html5BoilerPlate's team wrote about this bug - http://h5bp.com/i/378 They have several solutions.

Regarding Intranet & Compatibility view, there're settings when you go to tools > Compatibility view settings.

https://i.stack.imgur.com/2H54p.jpg


I have tried 4 or 5 other answers on Stack Overflow, and only this specific combination worked for me. For anyone using WordPress and an SEO plugin, be careful about the plugin rewriting the in another location. Edit: Added WordPress comment </div> <div class="p-3 mb-2 bg-light border rounded"> <code>X-UA-Compatible</code> should appear as early as possible, <a href="https://github.com/h5bp/html5-boilerplate/blob/master/index.html" rel="nofollow noreferrer">probably after <code>charset</code></a>. I don't think it's true that it "must appear straight after the title". </div> <div class="p-3 mb-2 bg-light border rounded"> This recommendation is a result of suffering under IE. Been gained by blood. Who says IE following guidelines? </div> <div class="p-3 mb-2 bg-light border rounded"> Wow, this worked for me and having my meta tags right after the title tag is what did the trick. Wish it weren't so archaic to make this work... </div> <div class="p-3 mb-2 bg-light border rounded"> Did not work on IE11 with: <meta http-equiv="X-UA-Compatible" content="IE=edge" /> </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">T</span> </span></div> <div class=" ms-3 w-100"> <small>TJ L</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> Note that if you are serving it from PHP, you can use the following code to fix it as well. </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>header("X-UA-Compatible: IE=Edge"); </code></pre> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> This works better than adding the meta tag, since it passes W3C validation using this method and is much easier than an .htaccess hack. </div> <div class="p-3 mb-2 bg-light border rounded"> I tried everything else, and this was what finally worked. Thank you. </div> <div class="p-3 mb-2 bg-light border rounded"> For those on WordPress, this may help: <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/send_headers" rel="nofollow noreferrer">codex.wordpress.org/Plugin_API/Action_Reference/send_headers</a> </div> <div class="p-3 mb-2 bg-light border rounded"> This works a lot better also when a huge site is built depending on <code><!--[if lt IE 7 ]> <html>...</code> ! THANK YOU! You are god sent!! </div> <div class="p-3 mb-2 bg-light border rounded"> @sunskin - Any header's sent by PHP MUST happen prior to sending any output to the page, that is before any HTML or data is output by PHP. </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">K</span> </span></div> <div class=" ms-3 w-100"> <small>Kerrick</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> As it turns out, this has to do with <a href="http://blogs.msdn.com/b/ie/archive/2008/08/27/introducing-compatibility-view.aspx" rel="noreferrer">Microsoft's "intelligent" choice</a> to make all intranet sites force to compatibility mode, even if <code>X-UA-Compatible</code> is set to <code>IE=edge</code>. </p> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> That's not true. The X-UA-Compatible will override the compatibility mode setting. However, sometimes using the meta tag does not work because the mode has already been set by the time it encounters it. This is why I use the HTML header version, so the browser can enable standards mode early in the process. </div> <div class="p-3 mb-2 bg-light border rounded"> Adding to Mystere Man's comment, you can override it from the hosting server using the web.config or the custom http headers in IIS. See my post above for details. </div> <div class="p-3 mb-2 bg-light border rounded"> I have tried this multiple times and it does not override all intranet sites forced to comparability mode. </div> <div class="p-3 mb-2 bg-light border rounded"> @Mystere Man: Define sometimes as whenever the page is in an iframe, where the parent document doesn't define XUA-COMPAT, and the document mode is inherited from the parent page (another very intelligent MS choice). </div> <div class="p-3 mb-2 bg-light border rounded"> @Kerrick: This is not the correct answer. See the one below this answered by tj111 for the correct answer. </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">P</span> </span></div> <div class=" ms-3 w-100"> <small>Pramod</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> I also got the same issue of IE9 rendering in IE7 Document standards for local host. I tried many conditional comments tags but unsuccesful. In the end I just removed all conditional tags and just added meta tag immediatly after head like below and it worked like charm. </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> </code></pre> <p class="mb-0 text-dark "> Hope it helps </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">r</span> </span></div> <div class=" ms-3 w-100"> <small>rshadman</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> Even if you have unchecked the "Display intranet sites in Compatibility View" option, and have the X-UA-Compatible in your response headers, there is another reason why your browser might default to "Compatibility View" anyways - your Group Policy. Look at your console for the following message: </p> <p class="mb-0 text-dark "> HTML1203: xxx.xxx has been configured to run in Compatibility View through Group Policy. </p> <p class="mb-0 text-dark "> Where xxx.xxx is the domain for your site (i.e. test.com). If you see this then the group policy for your domain is set so that any site ending in test.com will automatically render in Compatibility mode regardless of doctype, headers, etc. </p> <p class="mb-0 text-dark "> For more information, please see the following link (explains the html codes): <a href="http://msdn.microsoft.com/en-us/library/ie/hh180764(v=vs.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ie/hh180764(v=vs.85).aspx</a> </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">T</span> </span></div> <div class=" ms-3 w-100"> <small>T. Junghans</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> As NEOSWF points out above, the Paul Irish conditional comments stops the meta tag having any affect. </p> <p class="mb-0 text-dark "> There are several fixes all here (<a href="http://nicolasgallagher.com/better-conditional-classnames-for-hack-free-css/" rel="nofollow">http://nicolasgallagher.com/better-conditional-classnames-for-hack-free-css/</a>) </p> <p class="mb-0 text-dark "> These include: </p> <p class="mb-0 text-dark "> Adding two HTML classes, using server headers and adding a conditional comment above the doctype. </p> <p class="mb-0 text-dark "> On my latest project I decided to remove the Paul Irish conditional comments. I didn't like the idea of adding anything before the html without doing LOTS of testing first and it's nice to see what has been set just by looking at the HTML. </p> <p class="mb-0 text-dark "> In the end I surrounded a div straight after the body and used conditional comments eg </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code> <!--[if IE 7]><div class="ie7"><!--<![endif]--> ... regular body stuff <!--[if IE 7]></div><!--<![endif]--> </code></pre> <p class="mb-0 text-dark "> I could have done this around the body but its more difficult with CMSs like Wordpress. </p> <p class="mb-0 text-dark "> Obviously its another DIV inside the markup, but its only for older browsers. </p> <p class="mb-0 text-dark "> I think it could be a per project based decision though. </p> <p class="mb-0 text-dark "> I've also read something about the charset meta tag needing to come in the first 1024 bytes so this ensures that. </p> <p class="mb-0 text-dark "> Sometimes the simplest, easiest to read ideas are the best and its definitely worth thinking about! Thanks to the 6th comment on the link above for pointing this out. </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">a</span> </span></div> <div class=" ms-3 w-100"> <small>andyg0808</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> <code>X-UA-Compatible</code> will only override the Document Mode, not the Browser Mode, and will not work for all intranet sites; if this is your case, the best solution is to disable "Display intranet sites in Compatibility View" and <a href="http://www.danielclasson.com/guide-how-to-force-specific-sites-to-always-run-in-compatibility-view-using-group-policy/" rel="noreferrer">set a group policy setting</a> to specify which intranet sites need compatibility mode. </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">M</span> </span></div> <div class=" ms-3 w-100"> <small>Metzed</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> I added the following to my htaccess file, which did the trick: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>BrowserMatch MSIE ie Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie </code></pre> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> this works when intranet is set to compatibility. took me long time to find something that will work. specially when you search and everything is iis related </div> <div class="p-3 mb-2 bg-light border rounded"> This is awesome. I didn't know you could send headers with .htaccess </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">L</span> </span></div> <div class=" ms-3 w-100"> <small>Leonardo Molina</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> Additionally, X-UA-Compatible must be the first meta tag in the head section </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> </head> </code></pre> <p class="mb-0 text-dark "> By the way, the correct order or the main head tags are: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta charset="utf-8"> <title>Site Title</title> <!-- other tags --> </head> </code></pre> <p class="mb-0 text-dark "> This way </p> <p class="mb-0 text-dark "> we set the render engine to use before IExplorer begins to process the document then we set the encoding to use for all browser then we print the title, which will be processed with the already defined encoding. </p> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> Actually, the CHARSET should precede the X-UA-Compatible. See <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx" rel="nofollow noreferrer">blogs.msdn.com/b/ieinternals/archive/2011/07/18/…</a> </div> <div class="p-3 mb-2 bg-light border rounded"> It doesn't have to be first, but it does need to be near the top. It can follow title (and charset, as Eric noted), but that's about it. </div> <div class="p-3 mb-2 bg-light border rounded"> in my case on nginx it will only work if the X-UA-Compatible-tag is the first in the head section </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">S</span> </span></div> <div class=" ms-3 w-100"> <small>SouthShoreAK</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> Timmy Franks had it right for me. We just had the issue today where the client had IE8 company-wide, and it was forcing the site we wrote for their intranet into compatibility mode. Setting "IE-Edge" seemed to fix it. </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><httpProtocol> <customHeaders> <clear /> <add name="X-UA-Compatible" value="IE=Edge" /> </customHeaders> </httpProtocol> </code></pre> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">z</span> </span></div> <div class=" ms-3 w-100"> <small>z2z</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> For Nginx, </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>add_header "X-UA-Compatible" "IE=Edge,chrome=1"; </code></pre> <p class="mb-0 text-dark "> ref : <a href="https://github.com/h5bp/server-configs/commit/a5b0a8f736d68f7de27cdcb202e32975a74bd2c5" rel="nofollow">https://github.com/h5bp/server-configs/commit/a5b0a8f736d68f7de27cdcb202e32975a74bd2c5</a> </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">E</span> </span></div> <div class=" ms-3 w-100"> <small>EricP</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> IE 11 doesn't allow you to override the browser compatibility view setting anymore by sending the header... </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><meta http-equiv="X-UA-Compatible" content="IE=edge" /> </code></pre> <p class="mb-0 text-dark "> It appears the only way to force the browser to not use compatibility view is to have the user disable it in their browser. Ours is an Intranet site, and the default IE option is to use compatibility view for Intranet sites. What a pain! </p> <p class="mb-0 text-dark "> We were able to prevent the need for the user to change their browser settings for users of IE 9 and 10, but it no longer works in IE 11. Our IE users are switching to Chrome, where this is not a problem, and never has been. </p> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> It's not that it doesn't allow it, <code>IE11</code> doesn't support other Compatibility Modes other than <code>edge</code>. <a href="http://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx" rel="nofollow noreferrer">Link to official documentation</a>. That means we don't have to use that meta tag to hide the CM button on the address bar anymore. </div> <div class="p-3 mb-2 bg-light border rounded"> Untrue: IE11 still supports all legacy Compatibility Modes. </div> <div class="p-3 mb-2 bg-light border rounded"> @EricLaw, is EricP's answer correct (that IE11 changes the behavior for the X-UA-Compatible HTTP header)? </div> <div class="p-3 mb-2 bg-light border rounded"> @EricP, did you try the HTTP header, or only the <meta> tag version? </div> <div class="p-3 mb-2 bg-light border rounded"> @MatthewFlaschen: No, EricP is incorrect, as is Wallace Sidhree (although to be fair to Wallace, MSDN doesn't explain what they mean by "deprecated"). What changed in IE11 is that there's no visible "Compatibility View" button at all (<a href="http://technet.microsoft.com/en-us/library/dn321449.aspx" rel="nofollow noreferrer">technet.microsoft.com/en-us/library/dn321449.aspx</a>) but the X-UA-Compatible declarations are still respected. </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">u</span> </span></div> <div class=" ms-3 w-100"> <small>user3071843</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> I was able to get around this loading the headers before the HTML with php, and it worked very well. </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><?php header( 'X-UA-Compatible: IE=edge,chrome=1' ); header( 'content: width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' ); include('ix.html'); ?> </code></pre> <p class="mb-0 text-dark "> ix.html is the content I wanted to load after sending the headers. </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">j</span> </span></div> <div class=" ms-3 w-100"> <small>jfatal</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> I was experiencing the same issue in IE11. None of these answers solved my issue. After digging a bit, I noticed that the browser was running in Enterprise mode. (verify by hitting F12 and click the emulation tab, look for browser profile dropdown) The setting was locked, not allowing me to change the setting. </p> <p class="mb-0 text-dark "> I was able to change the profile to Desktop after deleting CurrentVersion from the following registry key: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode </code></pre> <p class="mb-0 text-dark "> After changing the mode to Desktop the answers on this post will work. </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">a</span> </span></div> <div class=" ms-3 w-100"> <small>ayciceksamet</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> When your browser opens with Compatibility Modes, even you remove and turn off all compability modes configuration from your web browser and Local Group Policy Editor, you can try to disable from register key. </p> <p class="mb-0 text-dark "> This also happen to me on using domain and sub-domain to connect server side. The machine is restricted to open in compability mode for all sub-domain. </p> <p class="mb-0 text-dark "> DISABLE COMPABILITY MODE FOR INTRANET </p> <p class="mb-0 text-dark "> HKEY_LOCAL_MACHINE - SOFTWARE - Policies - Microsoft - Internet Explorer - BrowserEmulation -> IntranetCompalityMode Value should be 0 (zero). And also remove existing domain name from PolicyList. </p> <p class="mb-0 text-dark "> Otherwise, you can add a new value (DWORD) that contain 0 (zero) value data. </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">c</span> </span></div> <div class=" ms-3 w-100"> <small>capadleman</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> I had the same issue after trying many combination I had this working note I have compatibility checked for intranet </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <head runat="server"> </code></pre> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">K</span> </span></div> <div class=" ms-3 w-100"> <small>Kevin Smith</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> If you are using LAMP stack, then add this into your .htaccess file in your web root folder. No need to add it to every PHP file. </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><IfModule mod_headers.c> Header add X-UA-Compatible "IE=Edge" </IfModule> </code></pre> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> </p> </div> </div> <div class="col-xl-3"> <div class="d-flex flex-row justify-content-start align-items-center bg-light mb-3 mt-8 py-2 rounded"> <div class="flex-fill"> <span class="avatar avatar-xl "> <img src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/images/brand/qrcode_for_gh.jpg?t=20230125' class="rounded w-100 mx-2" alt="关注公众号,不定期副业成功案例分享"/> </span> </div> <div class="flex-fill text-left"> <div class="mx-1"> <h5 class="mb-2 mt-3 ">Follow WeChat</h5> <p>Success story sharing</p> </div> </div> </div> <div class="card card-bordered mb-0 card-hover cursor-pointer"> <div class="card-body"> <h4 class="py-2"> Want to <span class="text-danger">stay one step ahead</span> of the latest teleworks? </h4> <a type="button" class="btn btn-sm btn-outline-primary rounded-pill w-100" href="/admin/payments.html" >Subscribe Now</a> </div> </div> <div class="mt-2 cursor-pointer"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8339074668991438" crossorigin="anonymous"></script> <!-- huntsbot-details --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-8339074668991438" data-ad-slot="7889891166" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="card mb-4 mt-4 border"> <div> <!-- Card header --> <div class="card-header"> <h4 class="mb-0">相似问题</h4> </div> <ul class="list-group list-group-flush"> <li class="list-group-item bg-transparent"> <a href="/qa/q0xXn">Force "Internet Explorer 8" browser mode in intranet</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/dL9B">JavaScript: Can I detect IE9 if it's in IE7 or IE8 compatibility mode?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/JgXD">How to forcefully set IE's Compatibility Mode off from the server-side?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/7Q4B">What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/LdBY">Hide scroll bar, but while still being able to scroll</a> </li> </ul> </div> </div> </div> </div> </div> </div> <!-- footer --> <div class="pt-lg-5 pt-3 footer bg-white"> <div class="container"> <div class="row"> <div class="col-lg-4 col-md-6 col-12"> <div class="mb-4"> <img src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/images/brand/logo/logo.png?t=20230125' style="width:30%"> <div class="mt-4"> <p> HuntsBot,a one-stop outsourcing task, remote job, product ideas sharing and subscription platform, which supports DingTalk, Lark, WeCom, Email and Telegram robot subscription. The platform will push outsourcing task requirements, remote work opportunities, product ideas to every subscribed user with timely, stable and reliable. </p> <div class="fs-4 mt-4"> <div class="btn-group dropup"> <button type="button" class="btn btn-primary dropdown-toggle fe fe-globe " data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> English </button> <div class="dropdown-menu"> <a class="dropdown-item" href="https://www.huntsbot.com/qa/5R0A?lang=zh_CN"> 简体中文 </a> <a class="dropdown-item" href="https://www.huntsbot.com/qa/5R0A?lang=en_US"> English </a> </div> </div> </div> </div> </div> </div> <div class="offset-lg-1 col-lg-2 col-md-3 col-6 hidden-less750"> <div class="mb-4"> <h3 class="fw-bold mb-3"> Platform </h3> <ul class="list-unstyled nav nav-footer flex-column nav-x-0"> <li> <a href="/telework.html" class="nav-link"> Outsource </a> </li> <li> <a href="/remote-job.html" class="nav-link"> Remote Job </a> </li> <li> <a href="/products.html" class="nav-link"> Products </a> </li> <li> <a href="/weekly.html" class="nav-link"> Newsletter </a> </li> <li> <a href="/pages/price.html" class="nav-link"> Pricing </a> </li> </ul> </div> </div> <div class="col-lg-2 col-md-3 col-6 hidden-less750"> <div class="mb-4"> <h3 class="fw-bold mb-3"> Support </h3> <ul class="list-unstyled nav nav-footer flex-column nav-x-0"> <li> <a href="/pages/about.html" class="nav-link"> About </a> </li> <li> <a href="/pages/faq.html" class="nav-link"> Frequently Asked Questions </a> </li> <li> <a href="/pages/faq.html" class="nav-link"> How to subscribe </a> </li> </ul> <h3 class="fw-bold my-3"> Links </h3> <ul class="list-unstyled nav nav-footer flex-column nav-x-0"> <li> <a href="https://tlr.xinbeitime.com/" class="nav-link" target="_blank"> 网球实时排名 </a> </li> <li> <a href="https://snapvideotools.com/" class="nav-link" target="_blank"> SnapVideoTools </a> </li> <li> <a href="https://tennisliveranking.com/" class="nav-link" target="_blank"> ATP/WTA/ITF Live Ranking </a> </li> </ul> </div> </div> <div class="col-lg-3 col-md-12 hidden-less750"> <!-- contact info --> <div class="mb-4"> <h3 class="fw-bold mb-3"> Contact US </h3> <p> Any questions or suggestions during use, you can contact us in the following ways: </p> <p> Email: <a href="mailto:huntsbot@xinbeitime.com"> huntsbot@xinbeitime.com </a> </p> </div> </div> </div> <div class="row align-items-center g-0 border-top py-2 mt-6"> <!-- Desc --> <div class="col-lg-8 col-md-7 col-12"> <span class="fs-5"> Copyright© 2022-2023 www.huntsbot.com <a href="https://beian.miit.gov.cn/" rel="noindex,nofollow" target="_blank" class="text-reset">浙ICP备2022000860号-4</a> All Rights Reserved. </span> </div> <!-- Links --> <div class="col-lg-4 col-md-5 col-12 d-md-flex justify-content-end hidden-less750"> <nav class="nav nav-footer"> <a class="nav-link ps-0" href="/pages/disclaimer.html" target="_blank"> Disclaimer </a> <a class="nav-link px-2 px-md-3" href="/pages/privacy_policy.html" target="_blank"> Privacy Policy </a> <a class="nav-link px-2 px-md-3" href="/pages/terms_of_ervice.html" target="_blank"> Terms of Service </a> </nav> </div> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="showQrCodeModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm" role="document"> <div class="modal-content "> <div class="modal-header"> <h5 class="modal-title " id="exampleModalLabel">微信公众号</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button> </div> <div class="modal-body"> <img src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/images/brand/qrcode_for_gh.jpg?t=20230125' class="rounded w-100" title="火星来客微信公众号" alt="火星来客微信公众号"> </div> </div> </div> </div> <div class="modal fade" id="modal-alert" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered " role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="modal-alert-title" >Tips</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body" id="modal-alert-body"> </div> </div> </div> </div> <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modal-alert" style="display:none" id="btn-common-alert"></button> <div class="modal fade" id="model-confirm" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-sm" role="document"> <div class="modal-content"> <div class="modal-body" id="modal-confirm-body"></div> <div class="modal-footer"> <button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">No</button> <button type="button" class="btn btn-primary btn-sm" id="btn-confirm-yes" btn-type="ajaxButton">Yes</button> </div> </div> </div> </div> <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#model-confirm" style="display:none" id="btn-common-confirm" ></button> <script > function alertError(message){ alertError(message,"Tips"); } function alertError(message,title){ if(title){ $("#modal-alert-title").html(title); } $("#modal-alert-body").html(message); $("#btn-common-alert").trigger("click"); } function confirmDialog(confirmMessage,actionUrl,actionSuccessMsg){ $("#modal-confirm-body").html(confirmMessage); $("#btn-confirm-yes").attr("data-url",actionUrl); $("#btn-confirm-yes").attr("data-message",actionSuccessMsg); $("#btn-common-confirm").trigger("click"); } </script> <!-- Scripts --> <!-- Libs JS --> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/jquery/dist/jquery.min.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/bootstrap/dist/js/bootstrap.bundle.min.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/bootstrap-select/dist/js/bootstrap-select.min.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/jquery.form/jquery.form.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/js/custom.js?t=20230125'></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?b25fc3fcffc44e8dff36dde049b4ebc1"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script type="text/javascript"> (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "fco75ff5x7"); </script> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-BTLS35QW08"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-BTLS35QW08'); </script> <script> (function(){ var el = document.createElement("script"); el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?a01aa87a04ac652b13258f439e7407fed09ba9bea51f9e0f26ab91ccc91c1924bc434964556b7d7129e9b750ed197d397efd7b0c6c715c1701396e1af40cec962b8d7c8c6655c9b00211740aa8a98e2e"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script> </body> </html>