W3C home > Mailing lists > Public > www-qa@w3.org > February 2005

Re: Quality Web Tips: Use standard redirects

From: Brian Huisman <bhuisman@greywyvern.com>
Date: Tue, 01 Feb 2005 14:22:16 +0000
Message-Id: <4610012aed860a561f0008e16b53641c@greywyvern.com>
Cc: www-qa@w3.org
To: Dominique HazaŽl-Massieux <dom@w3.org>

On Tue, 01 Feb 2005 10:58:49 +0100, Dominique HazaŽl-Massieux 
<dom@w3.org> wrote:

> Hi Lars,
> Le lundi 24 janvier 2005 ŗ 11:06 +0000, Lars Buitinck a ťcrit :
>> In http://www.w3.org/QA/Tips/reback, you might want to add a link to
>> the following page of the PHP manual, which describes how to easily
>> send a redirect to the user:
>> http://www.php.net/manual/en/function.header.php
> Thanks for your input, I've added a link from that page to the PHP
> manual.

I've noticed the main thrust of this page is about not "breaking" the 
back button.  It might be worthy to note that a meta tag with a 
zero-second refresh time will not be indexed in the history of any 
major browser:

<meta http-equiv="refresh" content="0; URL=http://www.example.org/bar" 

Pressing the Back button on the <http://www.example.org/bar> page will 
skip the redirecting page and go to the page you visited immediately 
beforehand.  Thus the back button is not "broken".  If, by chance, 
there is no page in the history before the redirect, all major browsers 
won't even display that there is a back option.

I agree that the best and cleanest methods for redirecting are 
server-side redirects based on Apache directives or PHP headers with 
*correct* HTTP responses.  But not everyone has access to a server-side 
solution, even these days.

Perhaps the tip should mention that if a <meta> refresh *must* be used, 
always use a zero-second refresh so the page will appear neither in the 
history, nor when pressing the back button.  Also note, that search 
engines will probably index both the blank, useless redirecting page 
*and* the target page; just to show that <meta> redirects are no 
substitute for the "real thing".

Brian Huisman
Received on Tuesday, 1 February 2005 14:29:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:40:36 UTC