Georgio has asked for the wisdom of the Perl Monks concerning the following question:
I need to send some cookies to the visitor with my CGI-script,and then to redirect him to the other site. But because of the 'cookies', that I'm sending with:
...
print $cgi->header(-type=>"text/html",-cookie=>$cookie);
... ,
I couldn't use (after sending 'header'):
...
use CGI qw(redirect);
...
print redirect('http://www.newsite.com');
... ,
and that's why I tried to use:
...
use CGI qw/:standard/;
...
print $cgi->start_html(-head=>meta({-http_equiv =>'refresh',
-content=>"0; url=http://www.newsite.com"}));
...,
and it works now, but I'm not sure whether this HTML TAG would work with all visitors.
So is there any better way to redirect to the new site?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: try to send cookie and redirect
by Ovid (Cardinal) on Apr 22, 2002 at 23:11 UTC | |
by Georgio (Sexton) on Apr 25, 2002 at 07:46 UTC | |
|
Re: try to send cookie and redirect
by wardk (Deacon) on Apr 22, 2002 at 22:55 UTC | |
by Kanji (Parson) on Apr 22, 2002 at 23:12 UTC | |
by Georgio (Sexton) on Apr 25, 2002 at 07:41 UTC | |
|
Re: try to send cookie and redirect
by shotgunefx (Parson) on Apr 22, 2002 at 23:15 UTC |