Home Web Front-end HTML Tutorial Important attributes for IE8 compatibility: X-UA-Compatible

Important attributes for IE8 compatibility: X-UA-Compatible

Jan 26, 2018 am 10:11 AM
ie Attributes

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

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
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:

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7" />
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,

<meta http-equiv="X-UA-Compatible" content="IE=7; IE=9" />
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:

<meta http-equiv="X-UA-Compatible" content="IE=8" />
Copy after login

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

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
Copy after login

For IE=EDGE

<meta http-equiv="X-UA-Compatible" content="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

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
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:

<meta http-equiv=”X-UA-Compatible” content=”IE=7″ /></p>< p><meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ ></p>< p><meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE8″ >
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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to get integer literal properties in Python without SyntaxError? How to get integer literal properties in Python without SyntaxError? Aug 20, 2023 pm 07:13 PM

TogetintliteralattributeinsteadofSyntaxError,useaspaceorparenthesis.TheintliteralisapartifNumericLiteralsinPython.NumericLiteralsalsoincludesthefollowingfourdifferentnumericaltypes−int(signedintegers)−Theyareoftencalledjustintegersorints,arepositiveo

How to rename properties of JSON using Gson in Java? How to rename properties of JSON using Gson in Java? Aug 27, 2023 pm 02:01 PM

The Gson@SerializedName annotation can be serialized to JSON and have the provided name value as its field name. This annotation can override any FieldNamingPolicy, including the default field naming policy that may have been set on the Gson instance. Different naming strategies can be set using the GsonBuilder class. Syntax@Retention(value=RUNTIME)@Target(value={FIELD,METHOD})public@interfaceSerializedNameExample importcom.google.gson.annotations.*;

Python's dir() function: View the properties and methods of an object Python's dir() function: View the properties and methods of an object Nov 18, 2023 pm 01:45 PM

Python's dir() function: View an object's properties and methods, specific code example required Summary: Python is a powerful and flexible programming language, and its built-in functions and tools provide developers with many convenient features. One of the very useful functions is the dir() function, which allows us to view the properties and methods of an object. This article will introduce the usage of the dir() function and demonstrate its functions and uses through specific code examples. Text: Python’s dir() function is a built-in function.

What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser) What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser) Feb 10, 2024 am 10:30 AM

More and more users are starting to upgrade the win11 system. Since each user has different usage habits, many users are still using the ie11 browser. So what should I do if the win11 system cannot use the ie browser? Does windows11 still support ie11? Let’s take a look at the solution. Solution to the problem that win11 cannot use the ie11 browser 1. First, right-click the start menu and select "Command Prompt (Administrator)" to open it. 2. After opening, directly enter "Netshwinsockreset" and press Enter to confirm. 3. After confirmation, enter "netshadvfirewallreset&rdqu

What to do if Win11 disk properties are unknown What to do if Win11 disk properties are unknown Jul 03, 2023 pm 04:17 PM

What should I do if the disk properties of Win11 are unknown? Recently, Win11 users found that the system prompted a disk error when using their computers. What is going on? And how to solve it? Many friends don’t know how to operate in detail. The editor has compiled the steps to solve the Win11 disk error below. If you are interested, follow the editor to read below! Steps to solve Win11 disk error 1. First, press the Win+E key combination on the keyboard, or click the File Explorer on the taskbar; 2. In the right sidebar of the File Explorer, find the side and right-click the local disk (C :), in the menu item that opens, select Properties; 3. Local disk (C:) Properties window, switch to Tools

bottom attribute syntax in CSS bottom attribute syntax in CSS Feb 21, 2024 pm 03:30 PM

Bottom attribute syntax and code examples in CSS In CSS, the bottom attribute is used to specify the distance between an element and the bottom of the container. It controls the position of an element relative to the bottom of its parent element. The syntax of the bottom attribute is as follows: element{bottom:value;} where element represents the element to which the style is to be applied, and value represents the bottom value to be set. value can be a specific length value, such as pixels

How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page Mar 20, 2024 pm 09:21 PM

Recently, many win10 users have found that their IE browser always automatically jumps to the edge browser when using computer browsers. So how to turn off the automatic jump to edge when opening IE in win10? Let this site carefully introduce to users how to automatically jump to edge and close when opening IE in win10. 1. We log in to the edge browser, click... in the upper right corner, and look for the drop-down settings option. 2. After we enter the settings, click Default Browser in the left column. 3. Finally, in the compatibility, we check the box to not allow the website to be reloaded in IE mode and restart the IE browser.

How to solve the problem that IE shortcut cannot be deleted How to solve the problem that IE shortcut cannot be deleted Jan 29, 2024 pm 04:48 PM

Solutions to IE shortcuts that cannot be deleted: 1. Permission issues; 2. Shortcut damage; 3. Software conflicts; 4. Registry issues; 5. Malicious software; 6. System issues; 7. Reinstall IE; 8. Use third-party tools; 9. Check the target path of the shortcut; 10. Consider other factors; 11. Consult professionals. Detailed introduction: 1. Permission issue, right-click the shortcut, select "Properties", in the "Security" tab, make sure you have sufficient permissions to delete the shortcut. If not, you can try running as an administrator, etc.

See all articles