?
This document uses PHP Chinese website manual Release
Retry-After
響應(yīng)的 HTTP 報(bào)頭指示所述用戶代理應(yīng)該多長時間使一個后續(xù)請求之前等待。有兩種主要的情況使用這個頭文件:
When sent with a 503
(Service Unavailable) response, it indicates how long the service is expected to be unavailable.
當(dāng)使用重定向響應(yīng)(如301
永久移動)發(fā)送時,它表示用戶代理在發(fā)出重定向請求之前要求等待的最短時間。
Header type | Response header |
---|---|
Forbidden header name | no |
Retry-After: <http-date>Retry-After: <delay-seconds>
<http-date> 之后重試的日期。有關(guān)Date
HTTP 日期格式的更多詳細(xì)信息,請參閱標(biāo)頭。<delay-seconds> 一個非負(fù)十進(jìn)制整數(shù),表示接收到響應(yīng)后的延遲秒數(shù)。
Retry-After
對客戶端和服務(wù)器上的標(biāo)頭的支持仍然不一致。但是,像 Googlebot 這樣的一些抓取工具和抓取工具可以很好地尊重Retry-After
標(biāo)題。將它與503
(服務(wù)不可用)響應(yīng)一起發(fā)送是非常有用的,這樣當(dāng)停機(jī)時間結(jié)束時,搜索引擎將繼續(xù)為您的站點(diǎn)編制索引。
Retry-After: Wed, 21 Oct 2015 07:28:00 GMT Retry-After: 120
Specification | Title |
---|---|
RFC 7231, section 7.1.3: Retry-After | Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | ? | (Yes) | No1 | ? | ? | ? |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | ? | ? | (Yes) | ? | ? | ? | ? |
見錯誤230260。參閱
Google 網(wǎng)站管理員博客:如何處理計(jì)劃的網(wǎng)站停機(jī)時間
503
(暫停服務(wù))
301
(永久移動)