Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: redirect in more than standalone mode

by Sidhekin (Priest)
on Nov 17, 2006 at 23:51 UTC ( #584814=note: print w/replies, xml ) Need Help??


in reply to redirect in more than standalone mode

If the browser supports Netscape's "refresh" headers (and what browser doesn't, these days?), you can give it a few seconds in which to render the page before redirecting.

To demonstrate, here's a variation of friedo's code:

#!/usr/bin/perl use strict; use warnings; use CGI; my $q = CGI->new; my $delay_seconds = 4; my $url = 'http://somewhere.com/'; print $q->header( -type => 'text/html', -refresh => "$delay_seconds; $url", ); print "<h1>Here's some HTML.</h1>";

Tested with Firefox and Apache.

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://584814]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-09-19 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (163 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!