سؤال

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!

هل كانت مفيدة؟

المحلول

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" />

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top