


Blank problem in web page UTF8 encoding development_PHP tutorial
Jul 13, 2016 pm 05:37 PM
A problem that has never been solved during development
The page is encoded in UTF8, and the header and tail are included in the template. As a result, there is an extra blank line of about 10px at the head and the tail without any reason, and there is nothing.
The reason is that they are all encoded in utf8. When files are included, the final binary stream contains multiple UTF8 BOM tags. IE cannot parse pages containing multiple UTF8 BOM tags normally and directly replaces them with the actual displayed carriage returns, which results in an Blank lines, but Firefox does not have this problem.
Therefore, if the template uses the inclusion method to contain multiple utf8 files and needs to be saved with ultraedit, select the save as function and save it in utf8 without BOM format.
In addition, if the Chinese page puts the title tag in front of <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″ /> in the html head tag, the page will be blank.
So utf8 pages should use the standard order
<meta http-equiv=”content-language” content=”zh-CN” />
<meta name=”robots” content=”index,follow” />
<meta name=”keywords” content=”” />
<meta name=”description” content=”” />
<meta name=”rating” content=”general” />
<meta name=”author” content=”” />
<meta name=”copyright” content=”” />
<meta name=”generator” content=”” />
<title></title>
There is a dedicated description of this issue in the w3.org standard FAQ:

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Five tips to teach you how to solve the problem of Black Shark phone not turning on!

How to solve the problem of automatically saving pictures when publishing on Xiaohongshu? Where is the automatically saved image when posting?

Four recommended AI-assisted programming tools

What should I do if the images on the webpage cannot be loaded? 6 solutions

Which AI programmer is the best? Explore the potential of Devin, Tongyi Lingma and SWE-agent

Learn how to develop mobile applications using Go language

How to implement page jump in 3 seconds: PHP Programming Guide
