Is it because of IE8 compatibility issues? I am glad to see this article. Haha
Are you worried about the compatibility of Internet Explorer 8 when you are doing a website? Haha... You are blessed to see this article. This article is reproduced this unknown elder brother (http://hi.baidu.com/lucy1407/blog/item/441b043f28e46dcb7c1e716a.html), thank him very much, let me solve a very headache.
IE8 finally came out, but the headache was how the original good page became messy. Don't worry. In fact, webpage display problems may not occur on your computer or browser, but because the development standards of various websites are different, therefore, the page may display problems when opened on different browsers.
To reduce this impact on your web browsing experience, IE8 not only adopts the W3C standard (World Wide Web Consortium standard ), to be compatible with websites developed based on other webpage standards, IE8 also provides the "Compatibility View" function. When IE8 detects that a website is incompatible, The Compatibility View button appears on the right side of the address bar. If a problem occurs, you only need to click it. Most Web pages are displayed normally. You don't have to worry about this operation every time. In order not to affect your Internet experience, after you click the Compatibility View button, this website will be automatically saved to the compatibility list. The next time you log on to this page, IE8 will automatically enable the Compatibility View.
Of course, IE8 also provides you with a permanent solution. You can use simple settings to display all websites in a Compatibility View. Click "Tools" on the right of IE and select "Compatibility View Settings". In the displayed dialog box, select "show all websites in Compatibility View ", this prevents page display problems caused by compatibility!
If you are a webmaster and find that your website is not properly displayed under IE8 browsing, what should you do? The following two methods are provided.
1. Add this line of code to the webpage to enable IE8 to use a compatible View:
<Meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/> |
Sample Code:
<HTML> <Head> <! -- Use IE7 mode --> <Meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/> <Title> my web page </title> </Head> <Body> <P> content goes here. </P> </Body> </Html> |
If you think it is troublesome to write code, you can add a custom HTTP header directly in the "HTTP header" tag. The custom HTTP header name is X-UA-compatible, the custom HTTP header value is Ie = emulateie7. After confirmation, the application will be ready.
2. If you think it is difficult to add this code on each page, we will introduce a simpler method. If you are using an IIS server, you can configure the Web. config file:
<? XML version = "1.0" encoding = "UTF-8"?> <Configuration> <System. webserver> <Httpprotocol> <Customheaders> <Clear/> <Add name = "X-UA-compatible" value = "Ie = emulateie7"/> </Customheaders> </Httpprotocol> </System. webserver> </Configuration> |
If you are using an Apache server, you can configure the httpd. conf file:
Loadmodule headers_module modules/mod_headers.so Header set X-UA-compatible "Ie = emulateie7" |
The preceding section allows all webpages to use a compatible view. If you only want to make files in a directory compatible with the view, set the following in <location>:
<Location/myfolder>
Header set X-UA-compatible "Ie = emulateie7"
</Location>