in reply to how to prevent browser timeouts

One simple technique for keeping the browser happy while a long-running CGI is cranking away is to unbuffer STDOUT, then periodically print   <!--ping--> It's a kludge, but it works.