I heard today that soon the http2 protocol will be implemented in modern browsers. More information: https://en.wikipedia.org/wiki/HTTP/2, I know wikipedia is not the best resource, but it will give a little clue about what is going on. The question is:
How will old browsers respond to http2 headers?
I mean on php (http://php.net) there is still (26.02.2015) a link in header function (http://php.net/manual/en/function.header.php) to the http1.1
specification (http://www.faqs.org/rfcs/rfc2616). I understand that in http2
all I must do is change header from for example HTTP/1.1 404 Not Found
to something similar to HTTP/2.0 404 Not Found
. But how will older browsers respond to it? Is this transparent for webdevelopers, and php coders, and implemented on browser / server side, or there are some important things / clues about compatibility?
Is using http2 headers right after they are ready a good idea?
I don't want to hurt anyone, but I know such a browser that it first name starts on the leter I
, and second with the letter E
, that can always mess up a little. I'm afraid that the new specification will totally ruined all older version of this browser, and that this http2
. And we - developers must write websites that just work, no matter where, and the magic http2
will come true after milions tons of patches / upgrades / months of compatibility problems with older machines.
There must be some code in well formed question, so here it is :):
<?php
header("HTTP/2.0 404 Not Found"); // Am I correct? It will look like this?
?>
What about old browsers in this case?
Is this a good idea to use it right after http2 is alive?
Additional documentation:
- Draft http2 specification: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-http2-17
- Wikipedia few words: https://en.wikipedia.org/wiki/HTTP/2
- PHP header function: http://php.net/manual/en/function.header.php
- W3.org about http2: http://www.w3.org/Protocols/HTTP/HTTP2.html