Click to search Andy Jarrett.co.uk RSS feed

Loading Twitter

Detect IE8 Compatibility Mode

I have recently had a client who complained to me that the site was broken in IE8 even though I had already checked it out. It turns out the issue was M$'s great "Compatibility Mode"

I know my way around CSS well enough but it felt wrong making any changes to keep this IE only mode happy when all other browsers were not complaining. Bing! I had an idea and went to Google and found this document on Defining Document Compatibility.

Turns out I can force the users browser to IE8 mode with the following

view plain print about
1<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >

Hopefully this will help some other developer with their designing woes.

Comments Comments (1) | Print Print | Send Send | 1383 Views

(Comment Moderation is enabled. Your comment will not appear until approved.)
Just implemented this myself last week. That meta tag has to be declared before any script tags in the HTML head.

When using CFFORM on a template, Coldfusion 8 (not sure about other versions) injects the cfform.js file at the beginning of the HTML head. This prevents the meta tag from functioning.

So, I used the HTTP Header method .... like so:
<cfheader name = "X-UA-Compatible" value = "IE=Edge">
BlogCFC by Raymond Camden + Twitter @AndyJ + ColdFusion jobs + Contact Me + Snippets/Downloads + RSS .