关闭站点的IE 8兼容模式 [英] Turn off IE 8 Compatibility Mode for site

查看:114
本文介绍了关闭站点的IE 8兼容模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的公司使用IE8作为默认浏览器,默认情况下,所有内部网站都设置了兼容模式。我建立一个内部网站点,当兼容模式关闭时工作。我使用reset.css和几个开源的javascript程序,例如。数据表。

My company uses IE8 as the default browser and by default compatibility mode is set for all intranet sites. I'm building an intranet site that works when compatibility mode is turned off. I'm using reset.css and several opensource javascript programs, e.g. datatables.

我想要做的是为我的网站强制兼容模式关闭。有什么程序化的方法吗?我已尝试设置元值

What I'd like to do is force compatibility mode off for my site. Is there any programmatic way to do it? I have tried setting the meta values

 <meta http-equiv="X-UA-Compatible" content="IE=IE8" />

 <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 

无效。

最令人沮丧的部分是Chrome和Firefox的工作原理是很好的。

What's the most frustrating part is that Chrome and Firefox work great as is.

推荐答案

< meta> 标签必须是< head> 内的第一个标签,除了< title> 和其他< meta> 元素。

The <meta> tag has to be the first tag inside the <head>, other than <title> and other <meta> elements.


X-UA-兼容头不区分大小写;但是,除了title元素和其他元素之外,它必须出现在网页的头部(HEAD部分)之前。

The X-UA-compatible header is not case sensitive; however, it must appear in the Web page's header (the HEAD section) before all other elements, except for the title element and other meta elements.

http://msdn.microsoft.com/en-us /library/cc288325%28VS.85%29.aspx#DCModes

这篇关于关闭站点的IE 8兼容模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆