404头 - HTTP 1.0或1.1? [英] 404 header - HTTP 1.0 or 1.1?
问题描述
HTTP / 1.0 404 Not Found
是否有任何理由不发送 HTTP / 1.1 404 Not Found
而不是? 很多......我大多只是好奇而已。)
HTTP版本的用法可以基于以下因素:
- 您对HTTP 1.0或1.1的Web服务器支持
- Web浏览器支持HTTP 1.0或1.1
- 您喜欢作为web开发人员使用哪种协议版本
现代浏览器可以同时支持1.0和1.1版本,并且客户端和服务器都将支持可同时支持的最高版本。 2协议之间的主要差异可以找到: http:// www8 .org / w8-papers / 5c-protocols / key / key.html
然而,404 Not Found的用法并无重大差异。但是,您的整个网站一致。即如果您使用HTTP / 1.1,则可以在整个网站中使用它。
Why does almost every example I can find (including this question from about a year ago) say that a 404 header should be HTTP/1.0 404 Not Found
when we've really been using HTTP 1.1 for over a decade? Is there any reason not to send HTTP/1.1 404 Not Found
instead?
(Not that it matters all that much... I'm mostly just curious.)
The usage of HTTP version can be based on the following factors:
- Your web server support for HTTP 1.0 or 1.1
- The web browser's support for HTTP 1.0 or 1.1
- Your preference as a web developer on which protocol version to use
Modern browsers can support both 1.0 and 1.1 well, and both the client and server will settle for the highest version both can support together. The key differences between the 2 protocol can be found: http://www8.org/w8-papers/5c-protocols/key/key.html
However there's no key differences in the usage of 404 Not Found. However do be consistent for your whole website. i.e. if you use HTTP/1.1, you use it throughout your website.
这篇关于404头 - HTTP 1.0或1.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!