Document mode IE7 standards for IE8 - internet-explorer-8

My document looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--[if lte IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<![endif]-->
I'm using IE10 to test everything. When I switch Browser Mode to IE7 the Page Default Document Mode shows to be IE7 standards. However when I switch to IE8 Browser Mode the Page Default Document Mode is IE8 standards. Why doesn't the meta tag change it to IE7 standards? Is it something to do with my browser configuration? How can I make sure that everyone who look at my site from IE8 get the Document Mode of IE7 by default?

You're hiding the meta tag, so IE10 will never see it. You'll need to remove the conditional comment wrapping.
And then, I presume that when you put IE in IE8 browser mode, that action forces use of the IE8 renderer and thus it will ignore the X-UA-Compatible header.

Related

Force IE8 to use Browser compatibility view

I have a page using the mixitup jquery script.
It works perfectly in Chrome, Opera and IE11.
But I need it to work in IE8 too.
I have the script working in IE8, just without the fancy animations, which is fine.
Except, it only works in IE8 when I set the browser compatibility view to 'Internet Explorer 8 Compatibility View'.
In the screenshot below, it shows different version, but you can see what option I mean, the second one rather than the first one.
I have tried entering the following meta to the top of page:
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
and also:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
But both those just seem to force the 'Internet Explorer 8', the equivalent to the top options in the screenshot... not the second one, which I need.
Can that be done?
thanks
If I understand your question correctly then may be below explanation will help you.
Using <meta http-equiv="X-UA-Compatible" content=" _______ " />
The Standard User Agent modes (the non-emulate ones) ignore <!DOCTYPE> directives in your page and render based on the standards supported by that version of IE (e.g., IE=8 will better obey table border spacing and some pseudo selectors than IE=7).
Whereas, the Emulate modes tell IE to follow any <!DOCTYPE> directives in your page, rendering standards mode based the version you choose and quirks mode based on IE=5
Possible values for the content attribute are:
content="IE=5"
content="IE=7"
content="IE=EmulateIE7"
content="IE=8"
content="IE=EmulateIE8"
content="IE=9"
content="IE=EmulateIE9"
content="IE=edge"
If meta tag solution wasn't working for you then set it
header('X-UA-Compatible: IE=edge,chrome=1');

Set Browser Mode to IE 8 automatically when html page gets loaded

My Application is compatible only with IE8.So, whenever we open the page,Broswer Mode should set automatically to IE 8,instead of going to developer tools and setting there
I always use
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" >
this needs to get in the head tag.
You need to add a meta tag to your document head specifying IE8 compatibility mode.
<meta http-equiv="x-ua-compatible" content="IE=8" >

IE Standards modes

I just have a quick question about IE8 Standards mode vs Quirks mode.
The page displays fine if you load its first page then log in. I have searched for the doc type which i think is right for changing the page to IE8 Standards Mode and i think it works because IE's built in debugger says it's in that mode. Also if you start on another page which uses quirks mode then navigate to my site the debugger changes modes to IE8 standards.
The problem starts if your change the mode to IE8 standards before you visit the page. e.g say your on google and change the mode in the debugger to IE8 standards then visit the site the page isn't displayed correctly.
I hope i've explained my problem clearly enough. I've posted the doctype i'm using is that is any help.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Add this meta tag to the head
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
This will force IE into the latest standards mode. So if they have IE8 it will be in IE8 even if its set before to other mode.
Also you could start using the html doctype without problem
<!DOCTYPE html>
You can read more about it here:
The IE Blog has posted "How IE8 Determines Document Mode" which you should read. Also, note that MS introduced a (... ah! Geries beat me to the punch while typing this!) Take a look at Geries' comment. :)

Ensuring strict mode in IE 8

I'm apparently triggering quirks mode (or at least IE 7 standards mode) even though I've added the strict doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
and the IE compatibility list meta:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
I've looked at the Developer Tools window for the page, and it says that the page default is IE 8 standards mode, but still renders the page wrongly. However, changing the mode in developer tools to another mode and then switching back to IE 8 standards mode causes the page to render correctly.
Is there some other IE-specific incantation that I'm missing, or is this a known bug for IE 8 (or the IE Developer Tools)?
If it helps, here are the first few lines of the page (Sorry I don't have a link to the page, it's a proprietary product that is intended for deployment on intranets). I've checked that nothing comes before the DOCTYPE (though that apparently is no longer an issue for IE 8):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- to override ie compatibility mode for intranets: http://blogs.msdn.com/b/ie/archive/2009/02/16/just-the-facts-recap-of-compatibility-view.aspx -->
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Either change your DOCTYPE to an XHTML one, or remove your self-closing tags.
I have encountered identical problem as Neil Ongkingco described. We've added a DOCTYPE, and the developer tool shows that the IE is rendering in IE8 Standard Mode. However, the webpage do not render as we expected. Changing the mode back and forth fixes the problem for that session, but it's not working as described. Here is what we've done to fix the problem.
We kept the DOCTYPE as below. I don't think it matters whether you have Loose or Strict mode.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Added the X-UA-Compatible metatag as described. We left out the closing slash as shown below.
<meta http-equiv="X-UA-Compatible" content="IE=8">

IE8 doctype changing

I am currently using an XHTML 1.0 transitional doctype on my vBulletin website. The page in question is PHP. The source (view source) of this page verifies that the XHTML 1.0 transitional doctype is on the page. Upon downloading (File > Save As) the page in IE8, I realized that my doctype had been replaced with an HTML 4.0 transitional doctype.
Why does IE8 change the doctype?
Why isn't the doctype its chosen displayed in the "View Source"?
The answer lies in the global vBulletin options menu.
vBulletin Options -> Cookie and HTTP Header Options -> Send Internet Explorer 7 Compatibility Header (Yes/No)
Disabling that will prevent IE8 from rendering as IE7, and from using the 4.0 HTML transitional doctype.
Please check which Document Mode Your IE8 is running in. If it is IE8 then its some other error. If it's something else than IE8 please add this meta tag as the first element of the <head> Tag.
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

Resources