• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

refreshing parent window after download completes

I have a link in a page to download a file and on completion of the download i want to refresh the parent page.I would like to know the code to achive this  
0
czutshi
Asked:
czutshi
1 Solution
 
cmalakarCommented:
There is no direct solution for this because download works in a separate request.

But there is a work around.

If you have tracking session for the users, then you can do the following.

When user clicks on some download link, it will start as a new request.
Server needs to keep track of this download request.
In the server, once the download is complete, you need to update a variable in session saying when the download was complete.

Client periodically, should send a ajax request to server asking if the file download is completed. If completed, then just refresh the page normally.

Without session tracking is also possible, but you need some kind of intelligence to identify that ajax and download requests are coming from same browser instance.

0
 
czutshiAuthor Commented:
Solution seems to give a headway but is not fully implemented yet
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now