?
? ????? PHP ??? ???? ??? ?? ??
Retry-After
響應的 HTTP 報頭指示所述用戶代理應該多長時間使一個后續(xù)請求之前等待。有兩種主要的情況使用這個頭文件:
When sent with a 503
(Service Unavailable) response, it indicates how long the service is expected to be unavailable.
當使用重定向響應(如301
永久移動)發(fā)送時,它表示用戶代理在發(fā)出重定向請求之前要求等待的最短時間。
Header type | Response header |
---|---|
Forbidden header name | no |
Retry-After: <http-date>Retry-After: <delay-seconds>
<http-date> 之后重試的日期。有關Date
HTTP 日期格式的更多詳細信息,請參閱標頭。<delay-seconds> 一個非負十進制整數(shù),表示接收到響應后的延遲秒數(shù)。
Retry-After
對客戶端和服務器上的標頭的支持仍然不一致。但是,像 Googlebot 這樣的一些抓取工具和抓取工具可以很好地尊重Retry-After
標題。將它與503
(服務不可用)響應一起發(fā)送是非常有用的,這樣當停機時間結束時,搜索引擎將繼續(xù)為您的站點編制索引。
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)站管理員博客:如何處理計劃的網(wǎng)站停機時間
503
(暫停服務)
301
(永久移動)