[Web] Your download will start in a few seconds...

jochemstoel

Jochem Stoel

Posted on June 21, 2018

[Web] Your download will start in a few seconds...

Download VS Code in 5 seconds

We have all seen this, it dates back to the 90's. You click a download link and you arrive at a page that tells you to wait a few seconds before the download starts.

It is very easy to replicate. Some function inside a setTimeout in JavaScript creates a HTMLAnchorElement, sets the href attribute to the direct URL of the file, a void download attribute to tell the browser it is a download and then triggers a click event.

I never questioned this but what exactly is the purpose of this? The only thing I can come up with is that it is some form of protection against crawlers (although I wouldn't know why that is necessary) or perhaps a way to force the user to visit the website and prevent linking directly from external webpages.

If this is actually the reason then it is not effective because the direct download URL is still in the page source so it can still be 'hotlinked'.

Anybody?

edit: apparently a lot of people say it is to show ads but many sites don't actually show ads but still use this functionality. StackOverflow

Download VLC in 5 seconds
Download TeamSpeak in 5 seconds

💖 💪 🙅 🚩
jochemstoel
Jochem Stoel

Posted on June 21, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related