Just print something back to the browser periodically while your script is running. Anything will do, even a single character. If you don't need feedback during the computation, use a single space so it will not occupy real estate in the browser window.
... code $| = 1; # set autoflush print "Content-type: text/html\n\n"; # simulate long running computation: for (1..3600){ sleep 1; # or do some processing # sends a single space to browser every 10 seconds unless ($_ % 10){ print ' ' } } ... more code
Update: Set autoflush before doing this.
In reply to Re: How to avoid browser time out?
by hangon
in thread How to avoid browser time out?
by advait
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |