I have a page that needs to give some file for download based on enetered parameters. Binary file is generated on webservice and I use following way to generate it and give to user.
document.location.href = MyServiceUrl?req=someAction
That works well, however when webservice requested it also generates some update in DB (in addition to file generation). When update is made I need to refresh data at my page (I use ajax). The question is: How can I catch a moment when webservice finish working (changes already in DB) and gives me a file to let me know that it's a time to make refresh?