If you try to validate your HTML code with a different header in the meta tag it will give a validation error and it will say your HTML code is not valid.
This causes a problem with webmasters that need to specify other headers but can only do it with the HTML code. Note it is also possible to set headers using server side code.
For example to set the browser to not cache using PHP the file will begin like this:
Code: Select all
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?><!DOCTYPE html>
<html lang="en">
<head>
(Note there is no space between the PHP section and the start of the HTML5 (See https://stackoverflow.com/a/14613096))
I did submit an issue with w3 about this here: https://github.com/whatwg/html/issues/7435
Jacob Persico