here is the situation:
In the web application, user selects some options, submits form, and PDF file is dynamically generated on the server side and offered for download.
The problem:
The generation of PDF file takes quite long (up to 1 minute). Some users think nothing is hapening and keep clicking the submit button again and again increasing server load and slowing it down even further.
I thougt about adding some busy indicator, which would show animated picture and message like “Please wait, your file is being generated”, which seems very easy to do.
But: how to hide this indicator when the file is ready and “file download” dialog pops up? Otherwise, the message stays on screen even after the user has downloaded the file!
Seems very basic requirement, but I’m completely stuck. Thanks for any suggestions!
I’ve had to do this for something that took a lot longer (converting a video’s format). It might seem like overkill to you but it did work.
*We had another download script that renamed it to a nice name (based on the original video filename) using the content-disposition header, but that’s really up to you!
Edit: I should add that the waiting page was the result of clicking submit. It was a new pageload but there’s no reason you couldn’t AJAX the whole process, just make sure, as others have said, to disable the submit button on the first click to stop the user going ape on it.