Changing url of a web site -- <meta> refresh

Prentiss Riddle riddle at is.rice.edu
Wed Apr 2 09:42:36 EST 1997


> From web4lib at library.berkeley.edu  Tue Apr  1 18:27:46 1997
> Date: Tue, 1 Apr 1997 16:18:06 -0800
> From: Bin Zhang <bzhang at lama105.kcc.hawaii.edu>
> To: Multiple recipients of list <web4lib at library.berkeley.edu>
> Subject: RE: Changing url of a web site
> 
> On your old server configuration file srm.conf, add a line like this: 
> 
> Redirect /oldpath/ new_URL

Redirect is the way to go if your server supports it and you have
control over the srm.conf file on the old server.  However, there's
another option which is useful in some cases:  the "refresh" option of
the <meta> tag.  The <meta> refresh feature can be used to make the
user's browser automatically jump to the new location (for web browsers
which support it, which at this time includes Netscape, lynx, and
possibly others).

To use <meta> refresh instead of Redirect, replace each obsolete HTML
file with a "stub" file that looks something like this:

  <html>
  <head>
  <meta http-equiv="Refresh" content="0; URL=http://www.blah.org/newURL.html">
  <title>The Blah Blah web page has moved</title>
  </head>
  <body>
  <h1>The Blah Blah web page has moved</h1>
  This page has moved.  Please correct your links to point to the
  new location:
  <center>
  <a href="http://www.blah.org/newURL.html">http://www.blah.org/newURL.html</a>
  </center>
  </body>
  </html>

The syntax of the <meta> tag above looks odd, but that's the right
format.  Note that the number before the semicolon (in this case 0)
specify the number of seconds to pause before automatically loading the
new URL.  When it's set to 0, the loading of the new page should be
almost instantaneous; if your goal is to publicize the move and get
people to correct their bookmarks rather than transparency, you may
want to set it to some higher number.  Users whose browsers don't
support <meta> refresh will see the explicit link and have to click
on it.

Another use of <meta> refresh is to make a page reload at the *same*
location, in which case you can eliminate the URL in the content
specification.  I update my top web page with breaking news a few times
a week, and I had been getting calls from people who thought I had
missed a day when they still had yesterday's version in their cache; I
fixed that by making my web page refresh itself once an hour with the
following <meta> tag:

  <meta http-equiv="Refresh" content="3600">

For more information on <meta> refresh, see:

  http://www.sandia.gov/sci_compute/elements.html#META

-- Prentiss Riddle ("aprendiz de todo, maestro de nada") riddle at rice.edu
-- RiceInfo Administrator, Rice University / http://is.rice.edu/~riddle
-- Home office: 2002-A Guadalupe St. #285, Austin, TX 78705 / 512-323-0708


More information about the Web4lib mailing list