Below is the JavaScript code below.
Step 1 : go to .pdf, .doc, .exe or something that is not html native. If location.href has taken the browser window, then there is no need to do step 2. (PDF files usually take the browser window). Most other functions start the boot manager process. For example, .exe. But there are some things, such as text documents, that can be downloaded or displayed directly in the browser window depending on the browser settings. I want him to do what hef.location would do.
Step 2 But if it downloads a file such as .exe after completing this process, go to the main page.
Or the solution to wait only 5 seconds between steps 1 and 2 seems to work most of the time. But with a slower connection, this does not always work. Then it goes to the home page without ending the first call to href.location, and they never see the PDF file or see the home page.
FYI ... The reason I wrap them in setTimeOut is due to this firefox problem. Stack Overflow: 864633 target-on-document-location-href-without-clobbering-history
My question is: Is there a way to find out when the location.href process is complete?
<script language="JavaScript"> </script>
source share