@
alian @
vikeria 请去制定 http 标准的 W3C 官方网站上看 http 状态码标准文档,顺便加个书签
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html原文是这么描述 307 的:
```
10.3.8 307 Temporary Redirect
The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s) , since many pre-HTTP/1.1 user agents do not understand the 307 status. Therefore, the note SHOULD contain the information necessary for a user to repeat the original request on the new URI.
If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
```
注意最后一段。
我用 307 是因为我的静态资源链接以后有可能变化的,所以我进行“临时的重定向”,实际使用要根据状态码性质可具体需求来选择。