[Techtalk] http refresh?
Caroline Johnston
johnston at biochemistry.ucl.ac.uk
Mon Feb 7 23:05:18 EST 2005
Thanks guys,
Turns out it was me being dim. The first definition of the refresh tag I'd
found said:
<meta http-equiv="Refresh" content="n;url">
so I had somthing like
<meta http-equiv="Refresh" content="1;http://blah.com">
As Almut pointed out, this should have been
<meta http-equiv="Refresh" content="1;url=http://blah.com">
and yeah, it should have been ampersands not semi-colons. I'm going to go
hang my head in the corner and feel silly now ;)
Cxx
On Fri, 4 Feb 2005, Almut Behrens wrote:
> On Fri, Feb 04, 2005 at 10:43:50AM +0000, Caroline Johnston wrote:
> > Hi list,
> >
> > I'm trying to use an <http-equiv content="Refresh"> tag to refresh a page
> > to a new location defined at runtime in a (perl) cgi script. I'm making
> > the tag like this:
> >
> > my $tag = '<meta http-equiv="Refresh" content="1;'
> > . $self->{q}->url
> > .'?submit=login;p=login;_cookiecheck=1"/>'
> >
> > and sticking it the header.
> >
> > This works as expected under firefox but ignores the parameters in IE. Do
> > I need to escape the ? somehow? What is firefox doing that IE isn't?
>
> Do you have the string "url=" in front of the URL?
> (yes, it's not in the above code, but, theoretically, it could be
> returned by $self->{q}->url together with the URL...)
>
> AFAIK, you don't need to escape the ? -- or & for that matter [1].
> (BTW, shouldn't those semicolons in the paramterlist be ampersands?)
>
> I just played around without the "url=", trying to redirect to some
> parameterized google search: It sent IE (6.0) into an endless loop,
> constantly reloading the same original page (which could only be
> stopped by closing the application ;) while Firefox did not have
> any problems with it.
> Whether the latter behaviour is the proper way to handle incorrect
> input, is another question, though... (in the larger context of things)
>
> Cheers,
> Almut
>
>
> [1] of course, you need to escape those special chars, if they're part
> of some parameter itself, e.g. if you're doing a "double redirect".
> I occasionally had the need to include a complete URL?params as a
> parameter, for example when redirecting to some generic login page,
> which - upon successful login - is supposed to redirect back to the
> page the user came from - something like
>
> http://host.domain.com/login?user=abc&camefrom=...
>
> where the "..." is a full URL with a parameter list -- in the second
> URL you need to escape special chars (with %XX hex values)
>
> _______________________________________________
> Techtalk mailing list
> Techtalk at mailman.linuxchix.org
> http://mailman.linuxchix.org/cgi-bin/mailman/listinfo/techtalk
>
More information about the Techtalk
mailing list