Reputation: 172
I tested my HTML5 webpage on w3c validator and got errors
"Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>"
But as you can see, I have doctype at first place. I found a post here HTML validation error: Non-space characters found before DOCTYPE saying something about BOM files. I am not sure if there can be BOM files in my source code.
Is there any way how to find BOM files recursively for a given directory using unix commands?
Is there any other reason why mentioned error displays to me?
UPDATE:
As watcher suggested, according to command
grep -rl $'\xEF\xBB\xBF' .
from topic Elegant way to search for UTF-8 files with BOM? there are no BOM source code files in my source code. So this is probably not matter of BOM files and there must be something else causing this error.
Upvotes: 5
Views: 6900
Reputation: 96597
Your pages literally contain the string Cannot detect language.
before your DOCTYPE.
It seems that it’s not contained in the HTML delivered to all browsers, all the time. I just saw it with Web (formerly Epiphany), but now it’s gone.
Downloading a page with Wget or cURL might still show it to you (still does for me).
Upvotes: 1