Part of the Html header appears in the body with space

After some updates, my landing page just broke. When examining an element in chrome, there is an empty head part, and all elements of the head are placed in the body tag. but when I search for the http response, all of this is correct.

At the beginning of the body part there is also a space that expands the layout. Here you can see it http://www.sporapp.com/

by the way. It works locally.

+4
source share
3 answers

I see an empty line in the response before the doctype declaration. After I copied / pasted HTML from the Chrome network tab, did I find a few? character right before doctype (it looks like it's some kind of character that notepad ++ cannot display for any reason). Check this file on vim on your server. Suppose you find a character before doctype that you do not have on your local machine. Remove it and assume that it will work (it works on my machine, at least the head is correctly disassembled) enter image description here

From the author of the question:

Thanks to Mercurial for BOM, it threw the encoding and called the specification. And also there is a php file that is enclosed? > Then spaces follow. After updating the broken file and removing the space, finally it’s ok :) ..

+4
source
+1
source

Just remove the empty line after the opening tag tag :)

0
source

Source: https://habr.com/ru/post/1434954/


All Articles