我在一家公司工作,我们所有的网站目前都使用 XHTML 1.0 过渡文档类型(是的,我知道这是非常古老的学校)。我想将它们全部更改为使用 HTML5 文档类型,因为它是向后兼容的。我想要进行切换的原因之一是因为在 IE8 中,如果有人安装了开发人员工具,那么旧的 XHTML doctype 会将浏览器切换到兼容模式并将页面呈现为 IE7。通过阅读它,我被引导相信 HTML5 doctype 会将任何页面设置为以标准模式呈现,但是当我在我们的登台服务器上测试它时,这并没有发生,它仍然会切换到 IE7 呈现模式。
奇怪的是,如果我在本地保存带有 HTML5 文档类型的页面并打开它,它会以 IE8 标准模式呈现。一定有其他原因导致它陷入兼容 IE7 渲染。任何想法这可能是什么?
以下是我一直在查看的测试页面的标题:
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>Burton - Mens Clothing - Mens Fashion - Burton Menswear</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Burton is one of the UK's leading men's clothing & fashion retailers, with a range of men's clothing designed to make you look & feel good. Find formal & casual clothes & accessories for men online at Burton menswear"/>
<meta name="keywords" content="menswear, clothes for men, clothing for men, men clothes, men's fashion, men's wear, men's clothing online, men's clothes online, men's clothes shop, burton men's, burton menswear, burton uk, burton"/>
<script type="text/javascript">document.getElementsByTagName('html')[0].className = 'js';</script>
<link rel="stylesheet" type="text/css" href="http://eu.burton-menswear.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/colors/color2/v3/css/screen.css" />
<link rel="stylesheet" type="text/css" href="http://eu.burton-menswear.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/colors/color2/v3/css/print.css" media="print"/>
<link rel="stylesheet" type="text/css" href="http://eu.burton-menswear.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/colors/color2/v3/css/brand.css" />
<!--[if lt IE 8]>
<link rel="stylesheet" href="http://eu.burton-menswear.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/colors/color2/v3/css/ie.css" type="text/css" media="screen, projection">
<![endif]-->
<meta http-equiv="content-language" content="en-gb" />
<link rel="shortcut icon" type="image/x-icon" href="http://eu.burton-menswear.com/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" title="burton.co.uk Search" href="http://eu.burton-menswear.com/burton-search.xml"/>
<!-- Start Summit Tag -->
<script type="text/javascript">
var __stormJs = "t1.stormiq.com/dcv4/jslib/3286_D92B7532_4A18_46A8_864A_5FDF1DF25844.js";
</script>
<script type="text/javascript" src="http://eu.burton-menswear.com/javascript/track.js"></script>
<!-- End Summit Tag -->
<!-- Start QuBit Tag -->
<script src=//d3c3cq33003psk.cloudfront.net/opentag-31935-42109.js async defer></script>
<!-- End QuBit Tag -->
<link type="text/css" rel="stylesheet" href="http://reviews.br.wcstage.arcadiagroup.ltd.uk/bvstaging/static/6028-en_gb/bazaarvoice.css" ></link>
</head>