Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 = ''; 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://584814]
[thezip]: There's a word I'm looking for, which describes the (lack of) repeatability of an instruction. Specifically, when a command is run the first time, it succeeds, but then every subsequent execution of the same command results in an identical result...
[thezip]: What is the name of this property?
[marto]: /mewaves
[marto]: /mefails
[thezip]: Duh... I found it. Idempotentcy
[thezip]: howdy marto!

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2018-07-18 20:38 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (395 votes). Check out past polls.