網(wǎng)站管理員可籍著為網(wǎng)站定義一個(gè)自訂標(biāo)頭來(lái)為他們的網(wǎng)站預(yù)設(shè)一個(gè)特定的文件兼容性模式。這個(gè)特定的方法取決于你的網(wǎng)站服務(wù)器。舉例來(lái)說(shuō),下列的web.config文件使Microsoft Internet Information Services (IIS)能定義一個(gè)自訂標(biāo)頭以自動(dòng)使用IE7 mode來(lái)編譯所有網(wǎng)頁(yè)。
<!-- This header mimics Internet Explorer 7 and uses <!DOCTYPE> to determine how to display the Web page --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"> 注意: 前面的范例顯示單獨(dú)的內(nèi)容值。實(shí)際上IE只會(huì)執(zhí)行網(wǎng)頁(yè)中第一個(gè)X-UA-Compatible標(biāo)頭。