X-UA-Compatible is a newly added setting for ie8, which is not recognized by browsers other than ie8. The difference between X-UA-Compatible and content = "IE = 7" regardless of whether the page contains <! DOCTYPE> commands all use the standard mode of Windows Internet Explorer 7. The content = "IE = EmulateIE7" Mode follows <! DOCTYPE> command. For most websites, it is the preferred compatibility mode.
X-UA-Compatible is a special file header tag for IE8, used to specify different page rendering modes for IE8. Due to the high utilization rate of IE6 and IE7, it is very important to enable the X-UA-Compatible compatibility mode of IE8.
Sample Code for various compatibility modes:
<meta http-equiv="X-UA-Compatible" content="IE=5" />
For example, the Quirks mode of Windows Internet Explorer 7 is used, which is similar to that of Windows Internet Explorer 5.
<meta http-equiv="X-UA-Compatible" content="IE=7" />
Whether or not the page contains <! The DOCTYPE> command uses the standard rendering mode of Windows Internet Explorer 7.
<meta http-equiv="X-UA-Compatible" content="IE=8" />
The standard rendering mode of IE8 is enabled, but since the X-UA-Compatible file header only supports IE8 or later versions, it is equivalent to redundant code.
<meta http-equiv="X-UA-Compatible" content="edge" />
Edge mode notifies Windows Internet Explorer to display content in the highest available mode, which breaks the "Lock" mode.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
EmulateIE7 mode notifies Windows Internet Explorer <! DOCTYPE> command to determine how to present the content. Standard mode commands are displayed in Windows Internet Explorer 7 standard mode, while Quirks mode commands are displayed in IE5 mode. Unlike IE7, EmulateIE7 follows the <! DOCTYPE> command. For most websites, it is the preferred compatibility mode.