{"id":96,"date":"2010-05-03T01:28:20","date_gmt":"2010-05-03T05:28:20","guid":{"rendered":"http:\/\/www.joebillman.com\/blog\/?p=95"},"modified":"2010-05-03T01:28:20","modified_gmt":"2010-05-03T05:28:20","slug":"w3c-page-validation","status":"publish","type":"post","link":"https:\/\/www.joebillman.com\/blog\/?p=96","title":{"rendered":"W3C Page Validation Issue"},"content":{"rendered":"<p>It&#8217;s good practice to always make sure that each page on your site validates to its proper doctype. Recently I noticed that some pages on a site I did that use to validate no longer did. It was giving me\u00a0an error saying that it didn&#8217;t know how to decode Content-Encoding &#8216;none&#8217;. This\u00a0was saying that I wasn&#8217;t declaring the encoding at the top of my page. The\u00a0thing is I was. Here is what the problem was. I am using php and have an external php page that contains functions on it that are used by the page and I was including that page at the top of the document. The problem with this was that it was above the\u00a0doctype declaration. All I had to do was move it down one line and that fixed it. I&#8217;m not sure if something has changed with the validation\u00a0because it use to validate, but if you run into this problem just move it down one line. Here is an example:<\/p>\n<p>Before:<br \/>\n&lt;?php include_once(&#8220;my-file.php&#8221;);?&gt;<br \/>\n&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;<\/p>\n<p>After:<br \/>\n&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;<br \/>\n&lt;?php include_once(&#8220;my-file.php&#8221;);?&gt;<\/p>\n<p>PS<br \/>\nI use a cool plugin for Firefox called <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/60\" target=\"_blank\" rel=\"noopener\">Web Developer<\/a>that has a built-in tool that will validate your page straight from the W3C Validator. If you are not currently using this I suggest checking it out!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s good practice to always make sure that each page on your site validates to its proper doctype. Recently I noticed that some pages on a site I did that use to validate no longer did. It was giving me\u00a0an error saying that it didn&#8217;t know how to decode Content-Encoding &#8216;none&#8217;. This\u00a0was saying that I &hellip; <a href=\"https:\/\/www.joebillman.com\/blog\/?p=96\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;W3C Page Validation Issue&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,31],"tags":[],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-programming","category-web-design"],"_links":{"self":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96"}],"version-history":[{"count":0,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}