Mark D
Mark D

Reputation: 71

What triggers the IE Compatibility Mode Button?

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.

Upvotes: 1

Views: 901

Answers (1)

Julie
Julie

Reputation: 263

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.

Upvotes: 1

Related Questions