I have a java servlet that returns a large pdf file to UI/browser for download. It takes the server 10-20 seconds to generate the file so I am trying to pop up the save as dialog ASAP to avoid browser lag, user confusion, wait and so on.
I only want to send headers etc. just to make connection, when server has its work done we flush the rest of payload.
I send <?xml XXXXXXXXXXXXXX?> immediately after headers and flush buffer. this works well in firefox and the browser shows the dialog thus eliminating the browser wait,,, this does not work for chrome.
Any help appreciated.