Share on Facebook Share on Twitter Email
Answers.com

Meta refresh

 
 

An HTML command that switches you to a different Web page within a specified amount of time. It is used to briefly display an outdated page and send the visitor to the new page. Fast meta refreshes are used to quickly switch doorway pages to the page the user is supposed to see. See doorway page.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a word or phrase...
All Community Q&A Reference topics
Wikipedia: Meta refresh
 

Meta refresh is a method of instructing a web browser to automatically refresh the current web page or frame 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.

Contents

Usability

Use of meta refresh is discouraged by the W3C, since unexpected refresh can disorient users[1]. Meta refresh also impairs the web browser's "back" button in some browsers (including Internet Explorer 6 and before), although most modern browsers compensate for this (Mozilla Firefox, Opera, Internet Explorer 7).

Alternatives to meta refresh include JavaScript, or HTTP redirection headers such as HTTP 301.

Examples

Place inside <head> to refresh page after 5 seconds:

<meta http-equiv="refresh" content="5" />

Redirect to http://example.com/ after 5 seconds:

<meta http-equiv="refresh" content="5;url=http://example.com/" />

Redirect to http://example.com/ immediately:

<meta http-equiv="refresh" content="0;url=http://example.com/" />

Drawbacks

Meta refresh tags have some drawbacks:

  • If a page redirects too quickly (less than 2-3 seconds), using the "Back" button on the next page may cause some browsers to move back to the redirecting page, whereon the redirect will occur again. This is bad for usability, as this may cause a reader to be "stuck" on the last website.
  • A reader may or may not want to be redirected to a different page, which can lead to user dissatisfaction or raise concerns about security.[2]

References

External links


 
 

 

Copyrights:

Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more
Wikipedia. This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Meta refresh" Read more