Do you think the clients browser goes and Posts the form again to the new
URL?

        No, I don't think that is what's happening.
        Once you post the info, the script is processing
        it and doing the redirect, but I don't think it is
        posting the entire string of nv pairs again.


If this is what is happening, is the solution to use: print "Location:
$url\n\n";

        I don't really know that it is 'the' solution, but
        I think it accomplishes what you want. Whether
        or not it's any faster, you would just have to
        test it and see.


Will this work for all browsers?

        I believe so, but I defer the official answer to
        that question to people on the list who are
        better qualified than I to answer it.


Thanks

Jonathan



> A common mistake is to print a header and then do a redirect, which slows
> the process down because essentially you have a script and a page
competing
> to generate a header. When using redirect(), do not do this:
>
> #!/usr/bin/perl
> use CGI;
> my $q = new CGI;
> print $q->header(); # don't need this if redirecting!
> print $q->redirect('http://www.whatever.com');
>
>
> Do this instead:
>
> #!/usr/bin/perl
> use CGI;
> my $q = new CGI;
> print $q->redirect('http://www.whatever.com');
>
>
> Or another option:
>
> #!/usr/bin/perl
> my $url = 'http://whatever.com';
> print "Location: $url\n\n";
>
>
> HTH,
>
> Scot R.
> inSite
>
> ___________________________
>
>
> After complaints that my CGI takes too long, I traced it down to the
> redirect() function.
> Why does it take so long?
> Is there an alternative?
>
> Jonathan


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to