> > I just wanted to mention that the meta tag as well as its http-equiv
> > attribute are both official parts of the HTML standard and have been
> > for quite some time.
>
> Yes and no.

Well, I disagree with the no. I will explain it again below.

> HTML 4.0 has a section on META and http-requiv. In it, it mentions that
> \"Some user agents support the use of META to refresh the current page
> after a specified number of seconds, with the option of replacing it by a
> different URI.\" and proceeds with an example. That sounds more advisory
> than part of the standard. But for the sake of argument, let\'s say it\'s part
> of the standard, and check what HTML 4.01 has to say.
>
> HTML 4.01 also has a section on META and http-requiv. However, the only
> reference to \"refresh\" is: \"Note. Some user agents support the use of
> META to refresh the current page after a specified number of seconds, with
> the option of replacing it by a different URI. Authors should __not__ use
> this technique to forward users to different pages, as this makes the page
> inaccessible to some users. Instead, automatic page forwarding should
> be done using server-side redirects.\"
>
> I\'m guessing this is because http-equiv is designed to hold an HTTP
> header, but there is no such thing as an \"Refresh\" header in HTTP.

No, there is an HTTP header called Refresh, and it is standard. The meta tag and the 
http-equiv attribute of the meta tag are also standard. However, some people seem to 
be confusing HTTP and HTML here for some reason. Refresh is an HTTP standard, while 
the meta tag is HTML. The http-equiv attribute of the meta tag allows some HTTP 
headers to be specified in the HTML. While this feature offers little to mod_perl 
developers who can manipulate the headers themselves anyway, it was historically very 
helpful to developers for providing accurate HTTP headers such as Expires when they 
could not otherwise do this.

The reason for that warning in the HTML specification is due to what the W3C likely 
considers a rampant abuse of the Refresh header which was not intended for redirection 
but only for refreshing the current resource. They are not warning against Refresh 
alone but rather what they consider a misuse of Refresh. The key phrase is, \"with the 
option of replacing it by a different URI.\" This is what is frowned upon, not the 
meta HTML tag nor the Refresh HTTP header.

> So http-equiv=\"refresh\" is no longer standard. Of course, this is all
> theoretical. In practice, too many people are not easily swayed by a
> measily thing such as a standard.

Right, and this was my second point in an earlier message. Support for this rogue 
feature is pretty widespread, though it should not be completely trusted. As one of 
the other posters pointed out, there are Web clients that do not support the use of a 
meta tag for redirection, but many (possibly most) do. It is quite common to see the 
use of a meta tag for redirection accompanied by instructions on the screen and a link 
for users that are not automatically redirected. By accomodating the users who are not 
automatically redirected, you can eliminate the possibility of a dead-end.

Of course, I hope that mod_perl developers always choose manipulating the real HTTP 
headers over the use of the http-equiv attribute of the meta tag. Also, it seems 
possible that there might be much wider support for redirection with the real Refresh 
HTTP header than for the meta tag equivalent. I know of at least one attempt to test 
and document support for this specific use:

http://www.hixie.ch/tests/evil/mixed/refresh1.http.html

Perhaps the results of this test can help a developer determine whether this misuse of 
the Refresh header is appropriate for a certain situation.

Chris


Reply via email to