question: My blog encoding is utf-8. Sometimes when you open the page it is blank, but it becomes normal after refreshing it, but when you check the source file it is complete. It works fine in IE6 and Firefox, but it occasionally happens in IE7. At first I suspected it was an IDC problem, but then I thought about js, css, page structure, etc. I thought of coding by accident. After all, encoding problems have troubled me more than once or twice. solve: <title>123WORDPRESS.COM</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> Swap the order <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>LC'BLOG</title> reason: Why does this problem only occur in IE7? This is because IE7 prioritizes the tags in HTML and then the information in HTTP header when parsing web page codes, while the Mozilla series of browsers are just the opposite. Because the UTF-8 encoded page is 3 bytes to represent a Chinese character, while the ordinary GB2313 or Big5 is two. When the page is output, due to the above reasons, when the browser parses and outputs the content of <title></title>, if there is an odd number of full-width characters before </title>, IE7 will parse UTF-8 as two bytes and half of a Chinese character will appear. At this time, the half Chinese character will be combined with the "<" of </title> to form a garbled character, causing IE7 to be unable to read the <title> part, resulting in the entire page being output as blank. If you check the source file at this time, you will find that the entire leaf surface has actually been output. Therefore, the simplest solution is to put the character definition <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> before <title></title> in the <head></head> tag of the web page file. In fact, similar problems exist in other encoding versions, but the default encoding of our browsers is GBK, so it is less likely to be detected. |
<<: The best solution for resetting the root password of MySQL 8.0.23
>>: Implementation of docker-compose deployment project based on MySQL8
Table of contents need: drive: Ideas: accomplish:...
1. Stop the mysqld.exe process first 2. Open cmd ...
In the previous article https://www.jb51.net/arti...
1. Download and unzip to: /Users/xiechunping/Soft...
Preface A Docker image consists of a Dockerfile a...
Table of contents 1. Declare a function 2. Callin...
CentOS7 is used here, and the kernel version is [...
Install Docker on CentOS 8 Official documentation...
Mysql8.0.12 decompression version installation me...
Table of contents 1. The concept of process and t...
1. ref is copied, the view will be updated If you...
react-native installation process 1.npx react-nat...
Limit input box to only pure numbers 1、onkeyup = ...
1. Background execution Generally, programs on Li...
In daily work, we sometimes run slow queries to r...