0

I'm developing a website and intend to support IE8 and above, so I'm not so concerned about older IE versions.

When users open the website in IE, it always jumps either to Compatibility mode or Quirks mode. Can I turn that feature off using this?

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

W3 Validation is not so much a concern, the only goal we want is to force IE not to open in compatibility mode OR quirks mode, does that meta do the fix for that?

This is the DOCTYPE I am using:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
Mahmoud Jabado
  • 99
  • 1
  • 2
  • 8
  • yes, it will do what you are expecting, but it won't pass w3c validation. this was stated by you, so I'm not sure what is the actual question – n1ckolas Mar 09 '13 at 14:55
  • I just wanted to make sure if this meta tag will fix the problem, i needed some experts to approve this fix, thank you. – Mahmoud Jabado Mar 09 '13 at 16:08

2 Answers2

1

Just have a look at this SO post.

Basically it should do what you need, I've used this in the past and it works. It'll open in standards mode in IE.

Just be aware, that if you open the developer tools in IE and select compatability mode, that is what IE will open in (compat mode) and the tag will not have an effect (because you are using developer tools to override the tag behavior). It does work, but you have to test it without the developer tool settings.

Community
  • 1
  • 1
Mike C.
  • 3,024
  • 2
  • 21
  • 18
  • Just let me see if i'm getting your point clear, what you're trying to say is that the website will be delivered WITHOUD compatibility mode AND WIHOUT quirks mode, unless the user changed that in the developer tools ? – Mahmoud Jabado Mar 09 '13 at 14:59
  • that has been my experience. We had a similar situation where we needed to ensure that it worked this way, and this is what worked for us. But the best thing to do is test it out for yourself (ofc) – Mike C. Mar 09 '13 at 15:00
-2

You can explicitly tell IE browsers to use its latest available rendering engine using a meta tag. This also prevents IE to open Quirks mode while rending page.

http://technowide.net/2013/06/21/forcing-ie-browsers-to-behave-properly/

Sachin Dhir
  • 211
  • 2
  • 8