IE8 Browser Mode & Standards Mode

29,677

Solution 1

Just give the HTML page the right doctype. E.g.

<!doctype html>

For an explanation and overview of all doctypes see http://hsivonen.iki.fi/doctype/. You don't necessarily need those (nasty) meta headers.

Solution 2

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.

Solution 3

It's impossible because the browser mode is determined before sending the request.

Solution 4

It's impossible because the browser mode is determined before sending the request.

This is right, I read microsoft documentation, see below:

An important detail to remember is that Browser Mode is chosen before IE requests web content. This means that sites cannot choose a Browser Mode. Instead site developers choose a Document Mode for their site, which overrides IE’s defaults and declares how a website is rendered.

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.

Solution 5

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.

Share:
29,677
user23048345
Author by

user23048345

Updated on September 10, 2020

Comments

  • user23048345
    user23048345 over 3 years

    I need to force IE8 to display as follows:

    1. Browser Mode: Internet Explorer 8

    2. 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" />