Add X-UA-Compatible meta to cope with IE8
Author:Eve Cole
Update Time:2009-06-20 16:53:03
X-UA-Compatible is a newly added setting for ie8. It is not recognized by browsers other than ie8. This difference is the same as content="IE=7", regardless of whether the page contains the <!DOCTYPE> directive. Standards mode of Windows Internet Explorer 7 is used. The content="IE=EmulateIE7" mode follows the <!DOCTYPE> directive. It is the preferred compatibility mode for most websites. It is the preferred compatibility mode for most websites.
Most sites were built before the official version of IE8 was released. We did not consider the compatibility of IE8 before, so in order to avoid errors in the pages produced under IE8, it is recommended to directly use IE8 for rendering with IE7. That is, add the following code directly to the meta tag of the header of the page:
<meta http-equiv=”X-UA-Compatible” content=”IE=7″ />
In this way we can make the page behave normally in IE8!
If you need to follow the <!DOCTYPE> directive, you can use:
<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />