Important attributes for IE8 compatibility: X-UA-Compatible

php中世界最好的语言
Release: 2018-01-26 10:11:50
Original
1998 people have browsed it

This time I will bring you the importantproperties that are compatible with IE8This is a practical case, let’s take a look at it.
The code is as follows:

Copy after login

1. What does this mean?

2. Some examples use "," to separate IE versions, while some use ";", which one is correct?

3. I want to know the meaning of the sequence IE=9; IE=8; IE=7; IE=EDGE.

Used

Reply:

For IE8 and above, for example:

The code is as follows:

Copy after login

Force the browser to render according to a specific version standard. But it does not support IE7 and below versions. If separated by a semicolon (;), there will be different compatibility for different browser versions. For example,

Copy after login

The above shows that IE8 and IE7 will be rendered according to the IE7 standard, but IE9 will still follow the IE9 standard. render. It allows for different backward compatibility levels. Although in a real situation, you only need to choose one version:

Copy after login

This will be easier for testing and maintenance. The usually more useful way is to simulate

Copy after login

For IE=EDGE

Copy after login

, this means that the browser will be forced to render according to the latest standards. Just like using the latest version of

JQuery

on Google’s CDN, this is to follow the latest version, but it may also break your layout because there is no fixed version.Finally, consider the following

Copy after login

Adding "chrome=1" will allow sites to use Chrome Frame

Client-side rendering has no effect if it is not used.

PS: .

At present, most websites use as the compatibility method for IE8. In order to avoid errors in the produced pages under IE8, it is recommended to use IE7 directly for rendering. That is, add the following code directly to the meta tag of the header of the page:

< p>

< p>
Copy after login

But still is the first choice.

StackOverFlow原链接;http://stackoverflow.com/questions/14611264/x-ua-compatible-content-ie-9-ie-8-ie-7-ie-edge?answertab=active#tab-top
Copy after login
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to php Chinese website

Other

related articles!

Related reading:

In HTML lists, what are the differences between dl(dt,dd), ul(li), and ol(li)


htmlHow to use the title attribute to display text when the mouse is hovering


What are the uses of the HTML head tag

The above is the detailed content of Important attributes for IE8 compatibility: X-UA-Compatible. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!