代码之家  ›  专栏  ›  技术社区  ›  Razor

IE8 blacklisted domain forcing non-standards mode

  •  0
  • Razor  · 技术社区  · 16 年前

    I was doing some tests on IE 8 on a standards-compliant page, with a strict doctype:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    

    However, apparently the page was being rendered in "IE 8 compat view"/"IE7 standards", which was breaking the layout.
    After looking around, I discovered that apparently IE has a websites blacklist, forcing compatibility mode for those listed.
    I then checked on this blacklisted domains DB 如果我正在工作的站点在列表上,但它不是。它是一个大站点,数据库定义似乎过时了,所以它可能是在去年左右添加的。

    在另一个域上测试完全相同的页面会触发IE8的标准模式,这表明它最近确实被列入黑名单。

    What can I do now to make IE8/7 trigger standards mode?
    Is there any way to remove the website from the blacklist?
    我想,如果没有其他可用的元素,我可以使用ua-meta,但是我更愿意避免添加(又一个)不必要的HTML元素,这些元素只是为了使ie工作而定制的。

    More information about IE8 and the compatibility blacklist

    2 回复  |  直到 16 年前
        1
  •  0
  •   Seidr    16 年前

    <meta http-equiv="x-ua-compatible" content="IE=8">
    

    编辑:对不起,我没看到你提到UA METAS,我猜这个答案有点多余。

    Edit 2: are there any whitespaces before the declaration of the DOCTYPE? I had this a while ago, and it was simply a matter of removing whitespace that was being dumped out before the DOCTYPE had been output. This knocked IE8 back into standards mode.

    Edit3: also, check your domain/ip on this site, it checks multiple URIBLs http://www.myiptest.com/staticpages/index.php/check-blacklisted-domain-URIBL

        2
  •  0
  •   Razor    16 年前

    Here is scunliffe's original comment (if you write it as an answer, I'll pick yours):

    Are you testing this on an external domain? or a localhost? or Intranet server? - IE renders "internal" servers in its "not quite so standards" mode by default. Note that in addition to the global compat list that MSFT maintains, each user's IE8 can add/remove sites from the local list.

    推荐文章