上QQ阅读APP看书,第一时间看更新
3xx family (redirection)
These status codes are used to convey redirection messages. The most important ones are 301 and 304:
- 301 is issued when a resource is moved permanently to a new URL endpoint. It is essential when an old API is deprecated. It returns the new endpoint in the response with the 301 status. By seeing that, the client should use the new URL in response to achieving its target.
- The 304 status code indicates that content is cached and no modification happened for the resource on the server. This helps in caching content at the client and only requests data when the cache is modified.