Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-20-2012, 08:58 AM #1
- Join Date
- Mar 2012
- Thanked 0 Times in 0 Posts
Force browser to close and reopen.
Hi, I am new here, it's nice to meet you guys.
The user will retrieve a file from the server and save it in the local drive. After that, the browser will automatically open the .pdf saved with the browser(IE) but not Adode reader.
If the user wants to update the previous saved .pdf in the local drive, they will need the user to close the opened file(saved .pdf) so that new updated .pdf can be replaced to the old .pdf file. So, I need to implement a function that force the browser to close, then copy and replace the old file, then reopen the file(new and updated) again.
Is there any possible way of doing this ? Please provide me some idea. I have tried to look for informations online but I just got no luck. Failed with the coding provided. Thanks in advance.
P/S : The file need to be closed in order to replace it with a new one. The platform using is Windows.
03-20-2012, 10:04 AM #2
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 663 Times in 652 Posts
From your PS it sounds like you simply want to do a forced reload of the current page in which case you just need location.reload(true); (the true forces it to reload from the server - with false it would reload from the browser cache).