http://www.perlmonks.org?node_id=919850


in reply to Re: keeping connection alive while spending time building a zip file
in thread keeping connection alive while spending time building a zip file

What if Javscript is not available (links, lynx, wget, curl, LWP::UserAgent) or blocked (NoScript, ...)?

Some people, when confronted with a problem, think "I know, I'll use Javascript." Now they have two problems.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^2: keeping connection alive while spending time building a zip file

Replies are listed 'Best First'.
Re^3: keeping connection alive while spending time building a zip file
by scorpio17 (Canon) on Aug 11, 2011 at 13:05 UTC

    If you use fork, and build the zip file with the child process, then the parent process can redirect to a "status" page. The status page will either display "working..." or "not done yet" while the zip is being built, or else display a clickable link to the zip once it's done. The ajax/javascript version of the page will automatically refresh the status every few seconds. If javascript is not available, you could try using a meta tag refresh, or else instruct users to click "reload" periodically (or put a message like "check back later" inside a noscript tag).