1

I work with a company that hosts a fair number of websites in a Perl ASP backend and we're trying to make sure our client's websites don't display the compatibility view button on the address bar of Internet Explorer unless absolutely necessary.

I've found one thing that triggers the button right away, which is including a javascript (in our case Jquery) file in the head section before the title and meta tags. However it's difficult to determine what makes IE think it should display the button beyond that (I'm testing in IE 10).

In testing one site that had the button displaying, I copied the page source code into an html file and tried viewing it locally. With identical source code, the live page displays the button while the local copy does not. Does Microsoft maybe do something similar to Google where a webcrawler indexes sites that might need compatibility view?

I find it's hard to get a straight answers as to who is really in control of this button and what aspects of a webpage contribute to the issue. Any help is appreciated.

pnuts
  • 54,806
  • 9
  • 74
  • 122
Mark D
  • 51
  • 2
  • Another question here that might be relevant is http://stackoverflow.com/questions/637039/how-to-avoid-ie8-compatibility-button which has an answer that points to MSDN's http://msdn.microsoft.com/en-us/library/cc817574.aspx. (although it seems specific for IE8 the links in that MS page also lead to more up-to-date info) – frozenkoi Sep 16 '13 at 23:12

1 Answers1

1

IE will display the Compatibility View button unless you hide it by specifying the document mode using X-UA-Compatible via a HTTP response header or META tag.

Try using this document compatibility mode meta tag:

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

...that forces IE to use its latest standards mode.

EricLaw
  • 54,427
  • 7
  • 140
  • 182
Julie
  • 243
  • 1
  • 3
  • 9