Tips on disabling IE8 and IE9's compatibility view mode using HTML

Tips on disabling IE8 and IE9's compatibility view mode using HTML
Starting from IE 8, IE added a compatibility mode, which will render with a lower version of IE when enabled. But sometimes this will cause problems with the web page, so we usually add the following code in HTML to make IE use a fixed rendering mode:

Copy code
The code is as follows:

<meta http-equiv="X-UA-Compatible" content="IE=8"> <!--Render in IE8 mode-->
<meta http-equiv="X-UA-Compatible" content="IE=7"> <!-- Render in IE7 mode -->

But I encountered a situation where the page can only be displayed normally in IE8 if the compatibility mode is not used. However, if the mode is set to IE8, CSS3 will become invalid in IE9. It seems that I need to disable compatibility mode for IE8 and IE9 respectively. What should I do? You can determine the browser version in the background. If it is IE8, output content="IE=8", and if it is IE9, output content="IE=9". But this is not possible with HTML. In fact, you can simply use the following code to achieve this:

Copy code
The code is as follows:

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">

<<:  What does it mean to add a question mark (?) after the CSS link address?

>>:  The website is grayed out. Compatible code including images supports all browsers

Recommend

Detailed explanation of styles in uni-app

Table of contents Styles in uni-app Summarize Sty...

MySQL implementation of lastInfdexOf function example

Sometimes MySQL needs to use a function similar t...

A brief discussion on Yahoo's 35 rules for front-end optimization

Abstract: Whether at work or in an interview, opt...

JS implements the rock-paper-scissors game

This article example shares the specific code of ...

Nginx installation error solution

1. Unzip nginx-1.8.1.tar.gz 2. Unzip fastdfs-ngin...

Implementation of remote Linux development using vscode

Say goodbye to the past Before vscode had remote ...

Talk about nextTick in Vue

When the data changes, the DOM view is not update...

Solution to CSS flex-basis text overflow problem

The insignificant flex-basis has caused a lot of ...

Implementation code for installing vsftpd in Ubuntu 18.04

Install vsftpd $ sudo apt-get install vsftpd -y S...

Vue batch update dom implementation steps

Table of contents Scene Introduction Deep respons...

Two methods to implement Mysql remote connection configuration

Two methods to implement Mysql remote connection ...

mysql group_concat method example to write group fields into one row

This article uses an example to describe how to u...

How to clean up the disk space occupied by Docker

Docker takes up a lot of space. Whenever we run c...