Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if user is using IE with compatibility mode

I am looking for some code (either PHP or JavaScript) would work well to check if a user viewing a page is using compatibility mode.

Then I can use that code to do some conditional statements, or basically give them a notification to turn it off.

like image 886
Bobby S Avatar asked Apr 04 '12 22:04

Bobby S


People also ask

How do I check my IE browser?

In the upper corner of Internet Explorer, select the Tools button, and then select About Internet Explorer. Open Internet Explorer, at the upper right, select the Tools button, and then choose About Internet Explorer.

Is there an IE compatibility mode in Chrome?

Add the extension to Chrome and follow the on-screen instructions that appear during the installation process. When the IE address bar is successfully installed, click the settings icon in the IE address bar. On the IE Tab Options and Settings page, scroll down to IE Compatibility Mode and click IE 11 Standards Mode.


1 Answers

Force them to:

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

This will disable Compatibility View, unless the user then goes and specifically turns it off by going into the Developer Tools and changing it.

like image 93
Niet the Dark Absol Avatar answered Sep 28 '22 06:09

Niet the Dark Absol