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

Introduction to fork in multithreading under Linux

Table of contents Question: Case (1) fork before ...

Customization Method of Linux Peripheral File System

Preface Generally speaking, when we talk about Li...

Teach you MySQL query optimization analysis tutorial step by step

Preface MySQL is a relational database with stron...

WeChat Mini Program Basic Tutorial: Use of Echart

Preface Let’s take a look at the final effect fir...

Detailed process of implementing the 2048 mini game in WeChat applet

Rendering Example Code Today we are going to use ...

Solve the problem of using swiper plug-in in vue

Since I used this plugin when writing a demo and ...

How to implement the @person function through Vue

This article uses vue, and adds mouse click event...

An example of how to write a big sun weather icon in pure CSS

Effect The effect diagram is as follows Implement...

Randomly generate an eight-digit discount code and save it to the MySQL database

Currently, many businesses are conducting promoti...

Vue implements table paging function

This article example shares the specific code of ...