Get the App
SLTechnology News&Howtos  ›  Development  › 

How to understand how to specify how IE browsers render

Shulou Source: shulou.com Published: 2022-06-03 09:18:27 10月04日 Update

This article focuses on "how to understand how to specify the way IE browsers render", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to understand how to specify the way IE browsers render"!

The above code tells the IE browser that IE8/9 will render the page with the IE7 engine, regardless of whether or not the document standard is declared in DTD.

The above code tells the IE browser that IE8/9 will use the IE8 engine to render the page.

The above code tells the IE browser that Windows displays the content in the highest version of IE.

Determine how to present the content according to the instructions. Standard mode instructions are displayed in Windows Internet Explorer 7 standard mode, while Quirks mode instructions are displayed in IE5 mode. Unlike IE7 mode, EmulateIE7 mode follows instructions. For most websites, it is the preferred compatibility mode. For people who use IE9/IE10, if you want to skip IE8 and specify to render in IE7 and IE9, you have to use the syntax recommended by the MSDN document:

However, the above syntax compatible with IE7/IE9 will lead to BUG in IE8, and it is found that the page is not rendered in IE7 document mode under IE8.

Correct grammatical rules:

1. When defining multiple document schemas, use a comma (,) instead of the semicolon (;) mentioned in the document.

Add:

1.X-UA-Compatible is a new setting for ie8, which is not recognized by browsers other than ie8, which is different from content= "IE=7" which uses the standard mode of Windows Internet Explorer 7 regardless of whether the page contains instructions or not. The content= "IE=EmulateIE7" mode follows instructions. For most websites, it is the preferred compatibility mode.

2.X-UA-Compatible is a special file header tag for the IE8 version that specifies a different page rendering mode for IE8. As the current utilization rate of IE6 and IE7 is still high, it is very important to enable the X-UA-Compatible compatibility mode of IE8 version.

Examples of various compatibility mode codes are as follows:

It's like using Windows Internet Explorer 7's Quirks mode, which is very similar to the way Windows Internet Explorer 5 displays content.

The standard rendering mode of Windows Internet Explorer 7 is used regardless of whether the page contains instructions.

Enable the standard rendering mode of IE8, but because the X-UA-Compatible file header only supports IE8 and above, it is equivalent to redundant code.

The Edge mode tells Windows Internet Explorer to display content in the highest level of available mode, which actually breaks the "locked" mode.

The EmulateIE7 mode tells Windows Internet Explorer to use instructions to determine how to render the content. Standard mode instructions are displayed in Windows Internet Explorer 7 standard mode, while Quirks mode instructions are displayed in IE5 mode. Unlike IE7 mode, EmulateIE7 mode follows instructions. For most websites, it is the preferred compatibility mode.

At this point, I believe you have a deeper understanding of "how to understand how to specify the way IE browsers render". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Mode directive standard browser browse content page method code document version website different compatibility syntax highest actual engine file learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Information macOS NVidia vpn