Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: CGI - Keep'em quiet page?

by mattr (Curate)
on Jun 18, 2001 at 13:59 UTC ( [id://89253]=note: print w/replies, xml ) Need Help??


in reply to CGI - Keep'em quiet page?

I've done this with only one frame by having the user first go to a static html page with javascript in the head.

The javascript checks a cookie and does a redirect to either a separate static page or to the cgi program.

You can do the same with a perl program by having it output the static html, or outputting the redirect, but you can't (as far as I know) set a cookie and do a redirect simultaneously from Perl.

Also it would be good to provide static links on the temporary page just in case redirection fails, i.e. no javascript or cookies accepted in user's browser, or failure of some useful javascript code due to browser version. By the way you can also modify the javascript on the fly if outputted from a Perl program.

Replies are listed 'Best First'.
Re: Re: CGI - Keep'em quiet page?
by Anonymous Monk on Jun 18, 2001 at 14:22 UTC
    Of course you can redirect with cookie. CGI::redirect accepts the same parameter as CGI::header.
      Sorry, perhaps I am corrected. I have had many problems getting cookie and redirect headers to be printed out together and actually followed (from CGI.pm), and have heard similar things from other people. I wouldn't want to be spreading FUD. Has anyone had the same? Please disregard that part until there is some corroboration one way or other since I know what I've seen. Perhaps old version of CGI.pm?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-20 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found