I need to force IE8 to display as follows:
Browser Mode: Internet Explorer 8
Document Mode: IE8 Standards
I have added this tag however it only affects the document mode, not the browser mode. How do I override browser mode to ensure the page is always shown with IE8 browser mode too?
<meta http-equiv="X-UA-Compatible" content="IE=8" />
As I understand it, the meta element you've posted tells the browser to use IE8 mode.
Using a strict doctype, e.g.
<!DOCTYPE html>
or<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
will tell the browser to render in standards mode.A combination of the two will render the page in IE8 Standards mode.
Just give the HTML page the right
doctype
. E.g.For an explanation and overview of all doctypes see http://hsivonen.iki.fi/doctype/. You don't necessarily need those (nasty) meta headers.
The problem resides in the historic battle between developers and Microsoft, and Microsoft's horrifically bad SharePoint Product line. Here is some history http://www.siolon.com/blog/ie-8-compatibility-mode-and-sharepoint/. (Not My Site) Basically IE renders, by default, all Intranet web pages in compatibility mode thus forcing all intranet sites to be no better then IE7. They probably did this because SharePoint is not web standards compliant and MS wanted their product to appear to work well on the corporate intranet sites where Sharepoint was already entrenched. I have a huge issue with this problem on a SharePoint site I am currently working on. Sharepoint uses the SharePoint:CssLink tag to dynamically load css files depending on browser. So while our site is designed for IE9, the IE7.css style sheet is sent to the page because the browser reports itself as an IE7 browser. The only solution in my estimation is to not use IE or design with IE in mind or to use SharePoint. If MS is forced to use web standards just to gain traffic on their platforms, then we might get them to change.
If you just need to change how it displays locally, you can use the Developer Tools. Press F12 (or choose Developer Tools from the Tools menu). There will be a menu item for both "Browser Mode", and "Document Mode". The change is dynamic and I believe the it will stay for the life of the session.
It's impossible because the browser mode is determined before sending the request.
This is right, I read microsoft documentation, see below:
But for some reason, my functions doesn't work properly if the browser is under IE-8 compat view. Even I have set the document mode correctly to IE8 Standards.