By "initiate a file download" do you mean:
1. the user clicks a link
2. the download is pushed to the browser
3. the download starts after a certain time period
Number 1 is easy, same for any webbroker app, number 2 could be faked
and kind of ties into number 3.
DD
in that case the easiest way is to fake the push either by a meta
refresh, or depending on what needs to happen on the server (building a
custom setup for the user, building reports, etc...) an ajax request
loop in the background of the page checking in with the dso to see if
the task is done and then pulling the file down.
I'm not sure on the specifics of downloading by ajax request, how/if it
prompts the user, but this could be gotten around by changing a hidden
iframe to the download path once the task is done.
Something like that?
DD
If a time delay is needed, things get a bit more complicated because
you'll need a thread safe way to keep track of your server side tasks,
I've used kbmMemTable with much success for various caching routines in
the past.
Once thats in place then you need a way to check it, meta refresh tag
inside the iframe to check in every 10 seconds. If its not done you
return the page with the refresh. When it is done return a different
page with the meta refresh set to the download path. It should prompt
the user to download. Oh.. the first time the page is loaded the iframe
would point to a url that'll create the task/job then return the refresh
page with the job number in the url.
A lot of this you can test by just making few static pages to work out
the flow and see if its the right direction.
For ajax stuff, you'll best source would be google for examples, but the
iframe refresh would be more compatible with various browsers (I really
hope no one is still using IE 4).
DD