htmlinternet-explorer-9internet-explorer-7doctypex-ua-compatible

IE9 going into IE7 compatibility view even with X-UA meta tag


So as per title, I'm using the X-UA-Compatible meta tag to force standards mode in the current IE version. (HTML below)

Despite this, in IE9 it goes into compatibility mode on percentage of users machines. I use Mac and it works fine on a Win7 IE9 virtual machine and also on my Windows machine's IE9. But when I test on a colleague's laptop it goes straight into compatibility view.

I've tried the following meta tags, without luck:

I have tried resetting internet explorer settings using this answer to the same question and it still doesn't work.

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7">
        <title>Site</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
...

Solution

  • Microsoft specifies that a comma should be used to separate each mode rather than the semicolon in your example snippet, as so:

    <meta http-equiv="X-UA-Compatible" content="IE=9,8,7"> 
    

    But I suspect that might be besides the point if you have already tried content="IE=edge" alone. A secondary solution would be to avoid the meta tag altogether and send X-UA-Compatible as an HTTP header instead.

    And if that does not work, I would look into the network settings (not just IE's settings) in your colleague's laptop and see if his network is treated as an intranet despite it not being an intranet.