Mobile app version of vmapp.org
Login or Join
Lengel546

: Redirect AFTER Initiating download I have a question - is there any way to initiate a download and AFTER the user has confirmed the download then redirect to another site? Is something like

@Lengel546

Posted in: #Download #Optimization

I have a question - is there any way to initiate a download and AFTER the user has confirmed the download then redirect to another site?

Is something like that possible via ASP or another language commonly used for websites?

Bad PHP "user experience" scenario (In use right now)


a) User comes to site, clicks download button
b) Users sees "download" landing page, gets redirected after 5
seconds
c) Download starts on Thankyoupage


Good "user experience" scenario: (my dream solution, what I want)


a) User comes to site, clicks download button
b) Download starts immediately on landing page
c) Download confirmed, redirects now to thank you page


Any programming language is a go for this.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lengel546

1 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

I do exactly this with javascript.

I have this in the header of my site:

function SetUpRedirect(destination)
{
setTimeout("window.location='http://www.foo.com/download.htm?file="+destination+"'",3000);
return true;
}


My download links look like this:

<a href="/downloads/foo.exe" title="Download Foo" onclick="SetUpRedirect('foo.exe')" class="funky_button_class">Download Now!</a>


Then my download page (download.htm) takes the file parameter and records it to a database plus provides a static link to the download. It does this with some fairly trivial PHP.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme