Ie7 open the page with source files, but the page is blank. Solution _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
Problem: My blog is UTF-8 encoded. Sometimes opening the page is blank and refreshing is normal, but viewing the source file is complete. Both ie6 and firefox are normal, but this happens occasionally in ie7. At first I suspected it was an IDC problem, and later I thought about js, css, and page structure. By accident, I thought of encoding. After all, encoding is no longer a problem:
My blog is UTF-8 encoded. Sometimes opening the page is blank and refreshing is normal, but viewing the source file is complete. Both ie6 and firefox are normal, but this happens occasionally in ie7.
At first I suspected it was an IDC problem, and later I thought about js, css, and page structure. By accident, I thought of encoding. After all, the encoding problem has not been solved once or twice.
Solution:
Foot home

Exchange Order

LC 'blog
Cause:
Why does this problem occur only in ie7? This is because ie7 gives priority to html tags when parsing webpage code, and then the messages in http headers, while mozilla browsers are just the opposite.
The UTF-8 encoded page represents a Chinese character in three bytes, while the common gb2313 or big5 is two. When the page is output, the browser parses and outputs IfWhen there are odd full-width characters in front of, ie7 treats UTF-8 as two bytes for parsing when there are half Chinese characters, then the half Chinese characters will match"<" Combined into a garbled text, leading to ie7 failure to read To make the entire page empty. At this time, if you look at the source file, you will find that all the leaves are actually output. <Br/> the simplest solution is to define the character <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8 "/> put in <title>Before.
In fact, similar problems exist in other encoding versions, but our browsers use GBK encoding by default, making it even harder to detect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.