files/en-us/web/http/reference/headers/refresh/index.md
The HTTP Refresh {{Glossary("response header")}} directs a web browser to either refresh or redirect the page when a specified amount of time has passed after the page was fully loaded.
It is exactly equivalent to using <meta http-equiv="refresh" content="..."> in HTML.
[!NOTE] Even though it's present in the HTTP response, the
Refreshheader is still handled by the HTML loading machinery and happens after HTTP or JavaScript redirects. See redirection order of precedence for more information.
<table class="properties"> <tbody> <tr> <th scope="row">Header type</th> <td>{{Glossary("Response header")}}</td> </tr> </tbody> </table>[!NOTE] When a refresh redirects to a new page, the {{httpheader("Referer")}} header is included in the request for the new page (if permitted by the {{httpheader("Referrer-Policy")}}), and {{domxref("document.referrer")}} is set to the referrer URL after navigating.
Refresh: <time>
Refresh: <time>, url=<url>
Refresh: <time>; url=<url>
<time>
<url> {{optional_inline}}
url= prefix is case-insensitive and optional.This header will cause the browser to refresh the page 5 seconds after it is fully loaded (that is, after the {{domxref("Window/load_event", "load")}} event):
Refresh: 5
This header will cause the browser to redirect to the a URL 5 seconds after the page is fully loaded:
Refresh: 5; url=https://example.com/
[!NOTE] See the
http-equiv="refresh"attribute in the HTML reference for important information about accessibility implications of automatic redirects.
{{Specifications}}
{{Compat}}