Meta refresh is a method of instructing a web browser to automatically refresh the
current web page after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a
content parameter giving the time interval in seconds. It is also possible to instruct the browser to fetch a different
URL when the page is refreshed, by including the alternative URL in the
content parameter. By setting the refresh time interval to zero (or a very low value), this allows meta refresh to be
used as a method of URL redirection.
Using meta refresh for redirection is considered by the W3C to be a poor
practice, since it does not communicate any information about either the original or new resource to the browser (or
search engine). Many web design tutorials also point out that client side redirecting
tends to interfere with the normal functioning of a web browser's "back" button. After being redirected, clicking the back button
will cause the user to go back to the redirect page, which redirects them again. Some modern browsers seem to overcome this
problem however, including Safari, Mozilla
Firefox and Opera. Others, like IE, can be "tricked" by doing two rapid
clicks of the "back" button - the first lands you on the redirect page, and before the time interval expires the second click
takes effect to land you on the previous page.
The W3C's Web
Content Accessibility Guidelines (7.4) discourage the creation of auto-refreshing pages, since most web browsers do not allow
the user to disable or control the refresh rate.
Examples
Refresh page after 10 seconds:
<meta http-equiv="refresh" content="10" />
Redirect to wikipedia.org after 10 seconds:
<meta http-equiv="refresh" content="10;url=http://wikipedia.org" />
References
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)