Example of Redirecting Visitors to Another Web Page


This page actually implements a redirect in which a visitor is automatically forwarded to another web page in approximately 30 seconds.


Helpful Tips

  • Make sure you allow enough time (about 15 to 30 seconds) so that users can read the message which is redirecting them to another location.  (The countdown begins as soon as the page starts to load.)

  • It is helpful if you include a brief statement that informs the visitor that they will be forwarded to another web page.  It's also helpful if the statement includes a link to the new web address and reminds people to bookmark the new web page.  Here is an example:

This page has moved to a new location.  You will automatically be redirected to the new page (http://www.pserie. psu.edu/index.htm) in 30 seconds.  Also, don't forget to update your bookmarks!

Format of the Refresh Function

  • The META tag is used for the refresh function. 

  • Place the META tag somewhere between the opening and closing HEAD tags.

  • The format of the META tag with the refresh function is shown below.  (Type the code on a single line.)

<META HTTP-EQUIV="Refresh" CONTENT="number-of-seconds; URL=web-address">

  • Notice that there is no quotation mark after the number of seconds --- instead a semi-colon is used.  Also, there is no quotation mark in front of the web address --- just the closing quotation mark after the address.

  • Example:

<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="30; URL=http://www.pserie.psu.edu">
<TITLE>Using the Meta Tag to Redirect Users</TITLE>
</HEAD>
<BODY>
As you can see, the Meta tag can be very useful when you would like to direct users to a different web page. 
</BODY>
</HTML>


Web site contact: ccwebmaster@psu.edu
Updated February 27, 2008
© 2005 The Pennsylvania State University