Warning: A DOCTYPE is not allowed in content at line -1

10:28 PM

You usually get this error message when you try to define a DOCTYPE for your Visualforce page. To give a brief description, there are two types of DOCTYPES (Strict and Transitional). Your Visualforce Page are pre-defined with a DOCTYPE, and you cannot override them. I am not sure about the use of DOCTYPES, and i have not encountered a situation to override them.

So, do not include the below line of code in your Visualforce page and the error disappears.
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  

0 comments

Stats