相关疑难解决方法(0)

X-UA-Compatible设置为IE = edge,但它仍然不会停止兼容模式

我很困惑.我应该可以设置

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Run Code Online (Sandbox Code Playgroud)

IE8和IE9应使用最新的渲染引擎呈现页面.但是,我刚刚对它进行了测试,如果在我们网站的其他地方启用了兼容模式,它将保留在我们的页面上,即使我们应该强制它不要.

怎么是你应该确保IE浏览器没有(甚至在企业内部网)使用兼容模式?

FWIW,我正在使用HTML5 DocType声明(<!doctype html>).

以下是该页面的前几行:

<!doctype html> 
<!--[if lt IE 7 ]> <html lang="en" class="innerpage no-js ie6"> <![endif]--> 
<!--[if IE 7 ]>    <html lang="en" class="innerpage no-js ie7"> <![endif]--> 
<!--[if IE 8 ]>    <html lang="en" class="innerpage no-js ie8"> <![endif]--> 
<!--[if (gte IE 9)|!(IE)]><!--> 
<html lang="en" class="innerpage no-js"> 
<!--<![endif]--> 
    <head> 
        <meta charset="ISO-8859-1" /> 
        <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
Run Code Online (Sandbox Code Playgroud)

编辑:我刚刚了解到 IE8的默认设置是对Intranet站点使用IE7兼容模式.这会覆盖X-UA兼容的元标记吗?

internet-explorer ie8-compatibility-mode x-ua-compatible

246
推荐指数
9
解决办法
37万
查看次数

强制Internet Explorer 9使用标准文档模式

如何强制Internet Explorer 9使用标准文档模式?我建立了一个网站,我发现IE9使用怪异模式来呈现网站页面.但我想使用标准模式进行渲染.

html internet-explorer quirks-mode internet-explorer-9

71
推荐指数
5
解决办法
14万
查看次数

强制Internet Explorer 9使用IE 9模式

我在顶部附近使用带有X-UA兼容元标记的HTML5 doctype:

<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en-us" class="ie6"> <![endif]-->
<!--[if IE 7]>    <html lang="en-us" class="ie7"> <![endif]-->
<!--[if IE 8]>    <html lang="en-us" class="ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    ...
Run Code Online (Sandbox Code Playgroud)

但是某些用户的Internet Explorer 9正在兼容性视图中呈现页面.我怀疑这是因为他们打开了"在兼容性视图中显示所有网站"设置.有没有办法强制IE9使用IE9浏览器和文档模式?

doctype internet-explorer cross-browser internet-explorer-9

18
推荐指数
3
解决办法
5万
查看次数