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

The concept of MySQL tablespace fragmentation and solutions to related problems

Table of contents background What is tablespace f...

How to add a paging navigation bar to the page through Element UI

need Add a paging bar, which can jump to the page...

Some tips on using the HTML title attribute correctly

If you want to hide content from users of phones, ...

HTML Table Tag Tutorial (47): Nested Tables

<br />In the page, typesetting is achieved b...

Vue implements calling PC camera to take photos in real time

Vue calls the PC camera to take pictures in real ...

Basic usage of exists, in and any in MySQL

【1】exists Use a loop to query the external table ...

MySQL 8.0.24 version installation and configuration method graphic tutorial

This article records the installation and configu...

Analysis of CocosCreator's new resource management system

Table of contents 1. Resources and Construction 1...

Analysis of MySQL user management operation examples

This article describes the MySQL user management ...

5 Reasons Why Responsive Web Design Isn’t Worth It

This article is from Tom Ewer's Managewp blog,...

Detailed explanation of the difference between tinyint and int in MySQL

Question: What is the difference between int(1) a...

How to expand the disk space of Linux server

Table of contents Preface step Preface Today I fo...