2

For debugging purposes, my web application shows the user's browser, version and operating system on the bottom of every page - this is done in Javascript.

In development and testing using IE9, the browser and version appear perfectly.

Three instances of the live application are running on the same webserver. I noticed on only ONE of them, rounded corners dont show up - and neither do shadows - and the browser is detected as IE8 (when using IE9) and the compatibility view button is missing!

Any ideas how to fix this? Thanks!

Jimbo
  • 22,379
  • 42
  • 117
  • 159

2 Answers2

2

Is it possible you have the developer tools open for the site and you have selected Internet Explorer 8 for the "Browser Mode" or "Document Mode"?

If not, look for a rogue meta tag in your HTML:

<meta http-equiv="X-UA-Compatible" content="IE=8" />
Andy E
  • 338,112
  • 86
  • 474
  • 445
  • +1 for possible causes. but it's also possibly the browser's config doing this, and I think that's the most likely cause. Also, would be good to suggest `IE=Edge` in the meta tag as a way to prevent it from happening, regardless of other factors. – Spudley Oct 18 '11 at 11:44
  • Exactly right: Document Mode was on IE 8 Standards for some reason. What concerns me as well is that it said (Page Default) next to it - would that be to do with a meta tag perhaps? – Jimbo Oct 18 '11 at 12:11
2

This is almost certainly because the browser is going into IE8-compatibility mode.

This can be triggered by various things, but when it's unexpected it is typically because of browser configuration.

Click on the tools menu, and select the "Compatibility view settings" menu option. This will show you what instances cause the browser to go into compatiblity mode. The most common cause is the "Local intranet" setting. This causes the browser to use compatiblity mode when you view a site on your local network (this includes localhost).

You can override this by adding a meta tag to your HTML code, as follows:

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

This will force IE to ignore the config setting and always use the the correct rendering engine rather than compatiblity mode.

hope that helps.

Spudley
  • 166,037
  • 39
  • 233
  • 307