Вопрос

I have the following html code that works without the http-equiv="X-UA-Compatible" in IE8 but fails when it has it. I think the order is correct (http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx), and the code is valid so I don't see the reason why it would do this.

Please, any explanation?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8, IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<base href="file:///D:/LocalPath/ToFrameElements/">
<title>IE8 stuff</title>
</head>
Это было полезно?

Решение 3

The frames wouldn't appear because of the standard document mode that the

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

or not relaying on the browser's error tolerance, the syntactically correct way

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

implies.

This is because in the standard document rendering mode IE does not allow the use of base href with links to the filesystem for security's sake. To have the base href working it can only be achieved by removing the the meta http-equiv="X-UA-Compatible" so that page will run in quirks rendering mode.

Другие советы

Your X-UA-Compatible http-equiv string is invalid.

It has 2 values:

  1. IE=8 ( IE 8 standards rendering mode )
  2. IE=edge ( latest engine )

However, the syntax is incorrect. The correct syntax is:

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

When multiple values are specified, highest value will be used. That is,

  • In IE9 , the page will be rendered in IE 9 standards rendering mode.

  • In IE8 , the page will be rendered in IE 8 standards rendering mode.

Solution: Fix the syntax and retry.

Reference:

  1. https://developer.mozilla.org/en-US/docs/Persona/Browser_compatibility
  2. Define Document Compatibility
  3. Understanding Compatibility Modes in IE8

Sidenote: IE supports this meta tag starting from IE 8.

The base element is defined so that its value must be an absolute URL. Besides, any effect of a file: URL is by definition system-dependent. So you should organize your local files and references to them so that a base tag is not needed.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top