serg111
asked on
CGI takes too long
#!/usr/bin/perl
OutputPage();
AnalizeResult();
exit;
This script above shows web page with delay 40 sec since function AnalizeResult() takes 40 sec to return. How can force page to be shown immediately after OutputPage() and then run AnalizeResult()?
OutputPage();
AnalizeResult();
exit;
This script above shows web page with delay 40 sec since function AnalizeResult() takes 40 sec to return. How can force page to be shown immediately after OutputPage() and then run AnalizeResult()?
.. doesn't help much when the sever times out before AnalizeResult() has completed.
You eithetr need to tell the web server's admin to increase the timeout (which s/he will not do, usually), or print a page which refreshes after a few seconds, while your CGI writes to a file.
You eithetr need to tell the web server's admin to increase the timeout (which s/he will not do, usually), or print a page which refreshes after a few seconds, while your CGI writes to a file.
ASKER
It doesn't work for me too :-(
Timeout is now 60 sec , so no sence to increase
and when I refresh page like this:
print "Location: http://www.server.com/M_BANNER.GIF\n\n";
It still takes 40 sec for file to load
Timeout is now 60 sec , so no sence to increase
and when I refresh page like this:
print "Location: http://www.server.com/M_BANNER.GIF\n\n";
It still takes 40 sec for file to load
> .. It still takes 40 sec for file to load
hmm, bad designed page ;-)
Anyway, if it is an image it should be cached by the browser, so should not be read again after a reload.
Did you write your refresh in the META tags of the html HEADer ?
hmm, bad designed page ;-)
Anyway, if it is an image it should be cached by the browser, so should not be read again after a reload.
Did you write your refresh in the META tags of the html HEADer ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$|++;
use CGI;
$q = new CGI;
print $q->header;
OutputPage();
AnalizeResult();
exit;