views:

1189

answers:

6

There are "Internet Explorer 8", "Internet Explorer 8 Compatibility Mode", and IE7 mode in IE8.

However, the default setting in IE make all intranet website use "IE8 Compatibility Mode" even I have setted doctype, the meta tag, http header as suggested to force it into IE8 mode.

I have

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

and

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

But it still goes into "IE8 Compatibility Mode", without any changes in IE setting.

How to force it into pure "IE8" mode, without change any browser's setting?

PS. I am not talking "document mode" here.

+3  A: 

You'll have to make some adjustments to IE.

Here they are.....

In Internet Options / Local Intranet / Sites

Under : Local Intranet inside Sites, uncheck "Automatically detect intranet network".

Then select only "Include all network paths (UNCs)

See attached screenshots

alt text

Codex73
Why would I have to make these adjustments. Please provide or link to an explanation of why security intranet settings have to be adjusted
Jesper Rønn-Jensen
here's your link to why:http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspxYou can also disable compatibility mode for all intranet sites if that what's needed.here's another link: http://support.microsoft.com/kb/956197
Codex73
+1  A: 

Set a custom HTTP header instead of using the <meta... in the <head> section. These are supposed to be equivalent, but I have seen that an X-UA-Compatible HTTP header from the server will override IE 8's "Display intranet sites in Compatibility View" setting, where the <meta... element would not.

David Kolar
unfortunately, it does not work. Checked the HTTP header has X-UA-Compatible: IE=8, but it still goes into "IE8 Compat" mode.
Dennis Cheung
I have a better understanding of your question now. The Browser Mode is only going to influence the UA string and which Document Mode you end up in when no `X-UA-Compatible` is specified. So while the Document Mode can be changed, the Browser Mode cannot, I think. And this is not seen as a problem since it's the Document Mode that affects the page rendering. Is there a reason you need to change the Browser Mode, perhaps for some UA string sniffing? You've got me curious. Can you tell the difference without Developer Tools open?
David Kolar
David, some javascript behave not the same in two modes(and you can never find a full detail list), some of the IE specific feature are even disabled in real IE8 mode. That's why they are two modes, not one. When user use the same browser, I wish they see and run the same; not a same version, different browser nightmare.
Dennis Cheung
I just found some more detail on the topic. http://blogs.msdn.com/b/ie/archive/2008/04/10/html-and-dom-standards-compliance-in-ie8-beta-1.aspx
Dennis Cheung
A: 

Seem that MSFT has not consider a large intranet environment that we have many different web application running inside.

There is no way to bypass the IE8 setting, according to somewhere I read on MSDN forum.

So, I will have to beg my system administrators to put some new group policies to change "Compatibility View" setting and the value and prevent user change the value, until MSFT discover this bug and fix it.

Dennis Cheung
+2  A: 

The problem is with your DTD. Per this chart on MSDN ("How Internet Explorer 8 chooses between IE7 and IE8 modes"), a DOCTYPE of HTML 4.01 Transitional will force the browser into Quirks mode, regardless of any X-UA-Compatible meta tags or HTTP headers.

Drop the Transitional from your DTD and you should be good to go.

josh3736
I am talking NOTHING about "DOCUMENT MODE". I am asking about "BROWSER MODE". They are two different concept and please don't mix them. http://i.msdn.microsoft.com/Ff405803.6b9d92cd-811a-4ca6-a8bc-99d463d0e16d(en-us,VS.85).jpg
Dennis Cheung
IE8's Compatibility Mode ("browser mode") is triggered by a combination of factors, including UI settings (such as the broken page icon next to the Refresh button) and DOCTYPE ("document mode"). With a DOCTYPE of `HTML 4.01 Transitional`, IE will *never* switch to IE8 Standards mode; it will render in Quirks. If you want the browser to switch to IE8 Mode, you need a compatible DOCTYPE.
josh3736
@josh3736 Even talking about "Document Mode," the very page you linked to states that the `X-UA-Compatible` directive overrides any `<!DOCTYPE>` switching. You can omit the `<!DOCTYPE>` entirely and still put IE 8 into Standards mode with `<meta http-equiv="X-UA-Compatible" content="IE=8">`. Additionally, that MSDN page has some mistakes. The DOCTYPE in question triggers `IE 8 Almost Standards` mode, not `Quirks`. The table is correct at http://blogs.msdn.com/ie/archive/2010/03/02/how-ie8-determines-document-mode.aspx. The `<!DOCTYPE>` is not the problem here.
David Kolar
Ah, I misread the flowchart; my apologies. I whipped up a [test page](http://pastebin.com/eMxe63YD) and can confirm that `<meta http-equiv="X-UA-Compatible" content="IE=8">` should make IE go in to `IE8` browser mode and `IE8 Standards` document mode. (However, without the `X-UA-Compatible` tag, the `HTML 4.01 Transitional` DOCTYPE does render in `Quirks` **if** you've omitted the system identifier, which the OP hasn't). Indeed, it looks like IE overrides `X-UA-Compatible` (for browser mode but not document mode -- strange) if the page is in the `Intranet` zone.
josh3736
+1  A: 

I am also need the same. Is there any solution? can we force the broswer to IE8. I have read follwing::::: Vlaue 8888 -Pages are always displayed in IE8 mode, regardless of the directive. (This bypasses the exceptions listed earlier.) in http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx but how to provide this value. Thanks for reply

Vishnu
I am afraid there is NO solution. The value 8888 in the page is a registry value which change by the PC administrator. But if I am system administrator, I could just disable the checkbox via registry or group policy and let IE use the same rules of Internet (compare to "intranet").
Dennis Cheung
A: 

Can you suggest me how can administration can change this and prevent user to change this value?

Vishnu