【发布时间】:2013-06-28 09:51:25
【问题描述】:
我在 winforms WebBrowser 控件中加载了网页。该页面需要以 IE8 模式呈现,所以我将 X-UA-Compatible 设置为 IE=8:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="PRAGMA" content="NO-CACHE" />
不幸的是,当我检查用户代理时,我仍然有 MSIE 7.0。 X-UA-Compatible 被忽略的原因是什么。当我直接在 IE9 中打开我的页面时,一切正常 - 文档模式切换到 IE8。
我的用户代理:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3)
【问题讨论】:
-
我知道,但我希望所有页面都使用 IE=edge,除了那个。
-
你好像只安装了ie7....
标签: c# winforms internet-explorer ie8-compatibility-mode