I know how to display output to a web browser (obviously) and I also know how to push a file for the client to download by setting the Content-Disposition and Content-Type headers and then pushing the file data. But I want to do both, similar to how many download pages work ("your file download will begin momentarily").
What technique is used to accomplish that? I was thinking about using a META HTTP refresh, but here's the thing... The web page is actually doing some fairly complex processing and I want to display the results of the processing to the user and push the results in file form to the user but only perform the processing once. I would like to avoid the HTTP refresh if possible. Is there any way to accomplish both of these with a single page request? Or am I going to have to write the file to the server and then serve it up on the second page request from the HTTP Refresh request?