20

My company uses IE8 as the default browser and by default compatibility mode is set for all intranet sites. I'm building an intranet site that works when compatibility mode is turned off. I'm using reset.css and several opensource javascript programs, e.g. datatables.

What I'd like to do is force compatibility mode off for my site. Is there any programmatic way to do it? I have tried setting the meta values

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

and

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

to no avail.

What's the most frustrating part is that Chrome and Firefox work great as is.

2
  • IE=IE8 does not seem to be valid, IE=8 functions as expected in my tests. (Added as a comment rather than an edit as edits must be >6 characters) Mar 13, 2012 at 14:51
  • I have recently tussled with the forces of compatibility mode (particularly with a view to tackling the default intranet “on” setting). I’ve written up how to get round the various issues I encountered here in case anyone else finds it useful: icanmakethiswork.blogspot.co.uk/2013/04/… Apr 1, 2013 at 10:58

2 Answers 2

21

The <meta> tag has to be the first tag inside the <head>, other than <title> and other <meta> elements.

The X-UA-compatible header is not case sensitive; however, it must appear in the Web page's header (the HEAD section) before all other elements, except for the title element and other meta elements.

http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx#DCModes

7

These must be the FIRST meta tag on your page. Perhaps that's the issue.

1
  • 1
    It doesn't have to be the first meta tag, but before all non-meta tags (except title). So no before style and script, etc. Oct 18, 2010 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.