Force IE compatibility mode off using tags

后端 未结 12 1380
广开言路
广开言路 2020-11-22 07:56

I am doing work for a client who forces compatibility mode on all intranet sites. I was wondering if there is a tag I can put into my HTML that forces compatibility mode off

12条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 08:31

    There is the "edge" mode.

    
       
          
          My Web Page
       
       
          

    Content goes here.

    From the linked MSDN page:

    Edge mode tells Windows Internet Explorer to display content in the highest mode available, which actually breaks the “lock-in” paradigm. With Internet Explorer 8, this is equivalent to IE8 mode. If a (hypothetical) future release of Internet Explorer supported a higher compatibility mode, pages set to Edge mode would appear in the highest mode supported by that version; however, those same pages would still appear in IE8 mode when viewed with Internet Explorer 8.

    However, "edge" mode is not encouraged in production use:

    It is recommended that Web developers restrict their use of Edge mode to test pages and other non-production uses because of the possible unexpected results of rendering page content in future versions of Windows Internet Explorer.

    I honestly don't entirely understand why. But according to this, the best way to go at the moment is using IE=8.

提交回复
热议问题