-
5 Nov 2010 3:18 PM #1
IE8 Rendering Problem - Intranet compatibility view - not standards compliant. Help!
IE8 Rendering Problem - Intranet compatibility view - not standards compliant. Help!
When I view my site on my local machine (localhost), everything looks good. I'm using an XHTML Strict DTD (although that doesn't seem to matter much in this case).
I've tried meta tags, and Apache headers, to force IE8 standards mode:
<meta http-equiv="X-UA-Compatible" content="IE=8" /> (also tried IE=100, IE=edge, IE=EmulateIE8, etc.)
I've validated my source code, and everything checks out. Page tests render properly, and in the correct mode, on both localhost and via internet. But I cannot post this, or most of the sites I develop, on the internet.
No matter what I try, IE8 (which is the default standard throughout my user base) will default to IE8 Compatibility View, which messes up the display of my pages. It's not the end of the world, but VERY annoying, and causes loss of functionality and rendering bugs in some places.
From my research, it seems that IE8 forces this rendering on ALL intranet pages. Well, as long as the DEFAULT setting of "Display intranet sites in Compatibility View" is selected. For me, changing this setting is not an option. The majority of our intranet sites are old, and need to fall back on the older rendering engine.
What I want to know is if there is any way to force IE to render properly according to DTD on an intranet site. I think this it is ridiculous to force all intranet sites into Compatibility view.
Any ideas?
-
5 Nov 2010 3:43 PM #2
should effectively disable CompatMode (which Ext will NEVER support) only if that tag is FIRST in the <head> section (although this has been reported to have little effect on your scenario)HTML Code:<meta http-equiv="X-UA-Compatible" content="IE=Edge">
Next to try:
Return a custom header to disable Local Internet CompatMode for that page:
X-UA-Compatible: IE=8"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
6 Nov 2010 11:29 AM #3
Hi,
I managed to workaround the compatibility view problem by doing the following:
1. Set HTML DocType (this step might be optional, I'd have to test it in more detail)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2. Set x-ua-compatible meta tag (as first child of head tag!)
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE8"/>
3. Add the following code at application startup:
That's it. From my point of view the problem lies in ExtJS wrongly detecting the actual browser. I'm aware that compatibility mode sets the user agent to IE7, but rendering is only done correctly if ExtJS assumes IE8 as the actual browser.Code:// hack for IE8 when compatibility view is used if(Ext.isIE7 && document.documentMode == 8) { Ext.isIE7 = false; Ext.isIE8 = true; Ext.getBody().replaceClass('ext-ie7', 'ext-ie8'); }
I'm kind of surprised that Sencha refuses to support compatibility mode, because many companies use it for legacy applications. It would be more consistent to also drop IE6 support...
HTH,
Matthias Reischenbacher
-
8 Nov 2010 9:36 AM #4
Definitely hackery...but it works!!

Thanks Matthias!
I'm really surprised Sencha doesn't support this too. In large corporate/government organizations such as I generally deal with, IE Compatability mode is necessary. Seeing as how it is technically possible (and apparently quite simple) to accommodate, I'm wondering why we would have to resort to this. But for now, I'm quite happy with adding a few lines of code to fix rendering issues across the board.
-
8 Nov 2010 9:42 AM #5
FYI Doug, this doesn't work for me. The reason seems to be that the development I am doing is on an intranet, and our policies (as well as our client's) are set to "Display intranet sites in Compatibility View", which causes IE to ignore X-UA-Compatible meta tags. Bit of a pain, but changing this setting would 1 - not likely be an option, and 2 - probably break more than it fixes. Legacy support is very important around here.
Similar Threads
-
[INFOREQ-1032] IE8 browser detection problem on intranet
By sareko in forum Ext 3.x: BugsReplies: 33Last Post: 14 Aug 2012, 1:28 AM -
[CLOSED][DUP][3.??] IE8 - compatibility view issues
By boylesw in forum Ext 3.x: BugsReplies: 4Last Post: 17 Jun 2009, 11:16 AM -
News: IE 8 to be standards compliant
By jay@moduscreate.com in forum Community DiscussionReplies: 7Last Post: 20 Dec 2007, 2:37 PM


Reply With Quote

