Solution to HTML encoding problem in IE6 that causes JS error and CSS not being applied

Solution to HTML encoding problem in IE6 that causes JS error and CSS not being applied
It was found in the test that when the page definition is encoded in utf-8,

If you put multi-byte characters such as Chinese in a js file, and save the encoding using the system default, such as gbk, instead of utf-8, an inexplicable error message will appear in ie, js, such as an unterminated comment;

In CSS, this will result in the same effect as if the CSS file has not been loaded.

If (php?apache) is included in the HTML, causing the HTML content to contain mixed encodings of utf-8+gbk, strange prompts will also appear.

This problem does not exist in the IE7 simulation test environment of IE10, and it can be automatically identified, but there is a problem in IE6 in IEtest.

<<:  Detailed explanation of Grid layout and Flex layout of display in CSS3

>>:  TypeScript namespace explanation

Recommend

How to uninstall MySQL 5.7.19 under Linux

1. Find out whether MySQL was installed before Co...

Vue uses echart to customize labels and colors

This article example shares the specific code of ...

Steps to create a WEBSERVER using NODE.JS

Table of contents What is nodejs Install NodeJS H...

Detailed explanation of the correct use of the if function in MySQL

For what I am going to write today, the program r...

Tutorial on installing MySQL 5.7.9 using RPM package under CentOS 7

Recorded MySQL 5.7.9 installation tutorial, share...

MySQL count detailed explanation and function example code

Detailed explanation of mysql count The count fun...

Application nesting of HTML ul unordered tables

Application nesting of unordered lists Copy code T...

Summary of various methods for Vue to achieve dynamic styles

Table of contents 1. Ternary operator judgment 2....

Implementation example of Nginx+Tomcat load balancing cluster

Table of contents introduction 1. Case Overview 2...

How to enable MySQL remote connection

For security reasons, MySql-Server only allows th...

Learn about CSS label display mode in one article

Tag type (display mode) HTML tags are generally d...

How to get form data in Vue

Table of contents need Get data and submit Templa...

MySQL series 15 MySQL common configuration and performance stress test

1. Common MySQL configuration All the following c...

How to use Axios asynchronous request API in Vue

Table of contents Setting up a basic HTTP request...