I am developing an HTML application and I was originally targeting IE7 because half of the company still had that particular version. They just upgraded to IE8 this week and I'm trying to get rid of any IE7 specific code.
One thing I noticed while using the IE developer tools is that when I view the home page on my local server, the Document Mode is set to IE8 Standards. If I view the same exact code base on my test server, it defaults to IE7 standards:
This is what I see when I look at developer tools on each server:
http://localhost:12345/
Browser Mode: IE8
Document Mode: IE8 Standards (Page Default)
http://webtest01/
Browser Mode: IE8 Compat View
Document Mode: IE7 Standards (Page Default)
What is causing them to be different on different servers?
EDIT
I think it is because Internet Explorer has a setting to display Local Intranet sites in Compatibility View. Is there a tag I can use to override this for my site?
IE is puts webtest01
in the Local Intranet Zone, which forces IE8 Compat browser mode/IE7 mode document mode.
I believe you can add a X-UA-Compatible
HTTP header (or <meta>
tag, so long as it's the first tag in your head), which should get the document mode into IE8 standards, but cannot fix browser mode, which has subtle implications for scripts.
To get IE out of compatibility browser mode, You have to go to Internet Options > Sercurity > Local Intranet > Sites and make sure everything is unchecked, or go to Tools > Compatibilty View Options and uncheck Display intranet sites in Compatibility View.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With