One line of code solves various IE compatibility issues (IE6-IE10)

One line of code solves various IE compatibility issues (IE6-IE10)

x-ua-compatible is used to specify the model for IE browser to parse and compile pages

The x-ua-compatible header tag is case-insensitive and must be used in the head and before other meta tags except title.

1. Use one line of code to specify the browser to use a specific document mode.

 <meta http-equiv="x-ua-compatible" content="IE=9" >
<meta http-equiv="x-ua-compatible" content="IE=8" >
<meta http-equiv="x-ua-compatible" content="IE=7" >

2. In some cases, we need to limit the browser's parsing of the document to a specific version, or limit the browser to the performance of some older versions. You can use the following method:

 <meta http-equiv="x-ua-compatible" content="IE=EmulateIE9" >
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" >
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE7" >

With this writing style, the browser either parses it in standard mode or in IE5 Quirks mode.

3. For testing purposes, we can also use the following statement to specify that the browser parse the page according to the highest standard mode.

 <meta http-equiv="x-ua-compatible" content="IE=edge" >

4. Specify multiple modes. We can separate multiple versions with commas, in which case the browser will choose the highest supported version from this list to render in standards mode. As shown in the example below, when browsing in IE8, IE7 standard mode will be used for rendering because it does not support IE9 and IE10.

 <meta http-equiv="x-ua-compatible" content="IE=7,9,10" >

The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. At the same time, I also hope that you can support 123WORDPRESS.COM!

<<:  Detailed explanation of six web page image carousel effects implemented with JavaScript

>>:  Example code for implementing fullpage.js full-screen scrolling effect with CSS

Recommend

MySQL 8.0.16 installation and configuration graphic tutorial under macOS

This article shares the installation and configur...

MySQL Packet for query is too large problem and solution

Problem description: Error message: Caused by: co...

Vue implements the question answering function

1. Request answer interface 2. Determine whether ...

Detailed explanation of the function and usage of keepAlive component in Vue

Preface During the interview, many interviewers m...

Do you know the difference between empty value and null value in mysql

Preface Recently I found that my friend's met...

Use tomcat to deploy SpringBoot war package in centos environment

Prepare war package 1. Prepare the existing Sprin...

MySQL 8.0.18 uses clone plugin to rebuild MGR implementation

Assume that a node in the three-node MGR is abnor...

Docker installs mysql and solves the Chinese garbled problem

Table of contents 1. Pull the mysql image 2. Chec...

js implements a simple countdown

This article example shares the specific code of ...

MySQL 5.7.17 installation and configuration tutorial under CentOS6.9

CentOS6.9 installs Mysql5.7 for your reference, t...

Graphic tutorial on configuring nginx file server in windows 10 system

Download the Windows version of Nginx from the Ng...

How to enable the slow query log function in MySQL

The MySQL slow query log is very useful for track...

Detailed explanation of 6 ways of js inheritance

Prototype chain inheritance Prototype inheritance...