Refresh header

The HTTP Refresh 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 Refresh header is still handled by the HTML loading machinery and happens after HTTP or JavaScript redirects. See redirection order of precedence for more information.

Note: When a refresh redirects to a new page, the Referer header is included in the request for the new page (if permitted by the Referrer-Policy), and document.referrer is set to the referrer URL after navigating.

Header type Response header

Syntax

http
Refresh: <time>
Refresh: <time>, url=<url>
Refresh: <time>; url=<url>
<time>

A non-negative number of seconds after which to refresh the page. Fractional parts are recognized but ignored; you should only specify integers.

<url> Optional

If present, the browser will redirect to the specified URL instead of refreshing with the current URL. This URL can be quoted or unquoted. The url= prefix is case-insensitive and optional.

Examples

Refreshing a page after a specific time

This header will cause the browser to refresh the page 5 seconds after it is fully loaded (that is, after the load event):

http
Refresh: 5

Redirecting after a specific time

This header will cause the browser to redirect to the a URL 5 seconds after the page is fully loaded:

http
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

Specification
HTML
# the-refresh-header

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Refresh
Chrome – Full support
Chrome 1 (Release date: 2008-12-11)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 1 (Release date: 2004-11-09)
footnote
footnote From version 136 the HTTP Referer header is sent following a refresh that redirects to another page (if permitted)
Opera – Full support
Opera 12.1 (Release date: 2012-11-20)
footnote Full support
Safari – Full support
Safari 1 (Release date: 2003-06-23)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
footnote
footnote From version 136 the HTTP Referer header is sent following a refresh that redirects to another page (if permitted)
Opera Android – Full support
Opera Android 12.1 (Release date: 2012-10-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 1 (Release date: 2007-06-29)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 1 (Release date: 2007-06-29)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.

See also