在 HTTP 协议中, 308 Permanent Redirect(永久重定向)是表示重定向的响应状态码,说明请求的资源已经被永久的移动到了由 Location 首部指定的 URL 上。浏览器会进行重定向,同时搜索引擎也会更新其链接(用 SEO 的行话来说,意思是链接汁被传递到了新的 URL)。

在重定向过程中,请求方法和消息主体不会发生改变,然而在返回 301 状态码的情况下,请求方法有时候会被客户端错误地修改为 GET 方法。

一些 Web 应用可能会将 308 Permanent Redirect 以一种非标准的方式使用以及用作其他用途。例如,Google Drive 会使用 308 Resume Incomplete 状态码来告知客户端文件上传终止且不完整。[1]

状态

  1. 308 Permanent Redirect

标准

标准标题
RFC 7538, section 3: 308 Permanent RedirectThe Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

Update compatibility data on GitHub

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
308ChromeFull support YesEdgeFull support YesFirefoxFull support YesIEFull support Yes
Notes


- Full support Yes
Notes

- Notes Does not work on Windows 7 and Windows 8.1.
OperaFull support YesSafariFull support YesWebView AndroidFull support YesChrome AndroidFull support YesEdge MobileFull support YesFirefox AndroidFull support YesOpera AndroidFull support YesSafari iOSFull support YesSamsung Internet AndroidFull support Yes

Legend

  • Full support
  • Full support
  • See implementation notes.
  • See implementation notes.

更多可见

  • 301 Moved Permanently
  • 302 Found, the temporary redirect

文档标签和贡献者

标签:

此页面的贡献者:mdnwebdocs-bot, WayneCui, ujsxn

最后编辑者:mdnwebdocs-bot,