找到你要的答案

Q:Suitable http status code to state the browser is not supported?

Q:适当的HTTP状态码状态的浏览器不支持?

I'm not supporting IE8 and below, and based on a useragent checked all requests made from one of these browsers are referred to a page where I explain the reason and display links to supported browsers.

Is there an HTTP status code to go along with this? 200 Wouldn't be right because the user is not getting the page he requested and 505 (Version not supported) refers to an outdated HTTP version, which is also not the case.

我不支持IE8及以下,和基于用户代理检查由一个浏览器的所有请求都是指一个网页,我解释原因和显示,支持的浏览器的链接。

有一个HTTP状态代码一起去吗?200是不对的因为用户没有得到他所要求的505页(版本不支持)指的是一个过时的版本,这也不是这样的。

answer1: 回答1:

I vote for

403 Forbidden "The server understood the request, but is refusing to fulfill it"

but there's no definitive answer to this.

我赞成

403禁止“服务器理解请求,但拒绝履行”

但是没有确切的答案。

answer2: 回答2:

400 Bad Request

From here:

BadRequest Equivalent to HTTP status 400. BadRequest indicates that the request could not be understood by the server. BadRequest is sent when no other error is applicable, or if the exact error is unknown or does not have its own error code.

400错误的请求

从这里:

BadRequest Equivalent to HTTP status 400. BadRequest indicates that the request could not be understood by the server. BadRequest is sent when no other error is applicable, or if the exact error is unknown or does not have its own error code.

answer3: 回答3:

I would use: 406 Not Acceptable

Note: This is technically misleading, because it not officially an issue with the client's Accept header, you're just trying to block a specific browser.

Whatever you do, go with a 4xx code. The 5xx's are for server issues, while the 4xx's are for client issues--in this case not using a supported browsers.

我会用:406不可接受

注:这在技术上是误导,因为它不是正式的问题与客户端的接受头,你只是试图阻止一个特定的浏览器。

无论你做什么,去一个4xx代码。的5xx是服务器的问题,而4xx的客户端有问题,在这种情况下,不使用受支持的浏览器。

internet-explorer  http  rest  cross-browser  http-headers