DEV Community

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

Jochem Stoel on June 21, 2018

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 ...
Collapse
 
cjbrooks12 profile image
Casey Brooks

Here's my guess.

The page exists so that the the "download url" is always the same (example.com/download). This is a dynamic page, so the URL of the file that's actually being downloaded is able to change as needed (updated versions, different locales, etc.) without having to set up any kind of server-side redirects or expect users to be able to find the most recent version of that page.

The "please wait" message then exists because the download is triggered via javascript, and the script may take some time to download and get parsed, especially on slower devices/networks. And the "click here to download manually" exists for users who have disabled javascript to still be able to get that file.

Collapse
 
jochemstoel profile image
Jochem Stoel

This is probably the correct answer. To maintain the download permalink. Thanks Casey.

Collapse
 
ewa profile image
Eric Anderson

I'm going to go out on a limb here and say that the technical rationales seem to be mostly red herrings. This technique (meaning mandatory and opaque Javascript between the nominal download URI and and a URL/parameter set that actually fetches the file) seems to be almost exclusively used on sites that are doing sketchy things to squeeze money out of visitors, and are very seldom used by legitimate sites that have the same or greater technical need for version updating, mirror selection, etc.

Collapse
 
joshcheek profile image
Josh Cheek

A 303 response code feels simpler to me.

Collapse
 
defman profile image
Sergey Kislyakov

I guess it's about the UX. You let the user see what's going to be downloaded and provide some info about it (Version, OS, etc.)

Also if you have a bunch of mirrors for the file, you can choose which one is going to be used based on the download speed (for this one you'd need a long-running (1+ sec) test), geolocation, ip, etc.

Collapse
 
bgadrian profile image
Adrian B.G.

Definitely is not a technical constraint (anymore), is about the UX and displaying other piece of information (like ads, help and documentation).

In the VSCode example you could dynamically replace the Download buttons with the correct link, the same way as the download starts after the intermediate page is visited. But by doing an intermediate page you solve more problems with 1 solution:

  • instant feedback - you press a button a new page opens (if the connection is slow a download is starting will not be instant)
  • page space - you now have a special dedicate page where you can put relevant information (like documentation, how to save the file, how to install) specific for that download file (platform, version)
  • automatic download (you can't do that on the main page, you do not know what version and platform the user wants to download
  • the users are now used to this behavior
  • all the other responses (unique url ..)

Back in the days solved a few tech issues (no one page apps), page views and ads were important.

Collapse
 
ashleyjsheridan profile image
Ashley Sheridan

I see it mainly used in conjunction with the automatic download that is achieved using response headers. Some browsers block this behaviour under different circumstances, so the link acts as a backup. This applies to the downloads that make you wait, although in that case the waiting is probably due to bandwidth throttling on their part, or as an attempt to get you to purchase their premium download subscription.

When it's used purely on its own, without the response headers, then it's probably the front-end developers who know how links work but don't know about response headers. This wouldn't be about any kind of UX, as the very act of visiting said page should be triggered by the user as a direct request on their part to perform the download. Moving the action to a link on a separate page is actually hurting UX, not improving it.

Collapse
 
phlash profile image
Phil Ashby

Depends which download site you are using? Places that host large 'not terribly legit' files will make you wait/limit bandwidth, then offer you a premium account for a small fee.. not gonna name any but I had to use quite a few when I was doing reverse engineering on a regular basis :)

Otherwise, I would agree that it's finding a good local mirror from a fixed download URL, most likely code provided by a CDN like this: akamai.com/uk/en/products/media-de...

Collapse
 
ikoala profile image
iKoala

One of the reason is to prevent other sites to steal your download link and paste it on their site to steal your traffic. The direct link generated in the download page is not always the same, it may have expiry time and/or being invalid when you send it to someone else or paste it in a different browser. It focrces you to share the perma link of the download page with proper information, ADs, invalidate outdated version and increase traffic of their site.

Collapse
 
jochemstoel profile image
Jochem Stoel

Thanks everyone for repeating everything I already said when I asked this question.

Collapse
 
peter profile image
Peter Kim Frank

I've always been curious about this, excited to follow along and read more answers.

Collapse
 
nektro profile image
Meghan (she/her)

I agree with @defman 's answer, since with the advertising idea, I've also seen this occur on a lot of open source downloads as well that have no ads

Collapse
 
chiragsingh1711 profile image
chiragsingh1711

Heyy !! I am a newbie and I want this download page in my website. Can anyone please refer me a source where I can learn exactly the same thing ??

Collapse
 
ogfris profile image
Fris

Pretty sure most of them want the page to load so we can see more contant and more ads obviously.

Collapse
 
hoffmann profile image
Peter Hoffmann

Guess: It's because of the ads. You just don't see them b/c of your adblocker

Collapse
 
jochemstoel profile image
Jochem Stoel

Even though the correct answer has been given already let's all applaud this incredible contribution and insight by Peter.

Collapse
 
k1pash profile image
Christopher Toman • Edited

I got 2 ideas:

1#: old system, lazy coders, dumping the usage of the link (but as you said, the hotlink is still there)

2#: try to ask them yourself, people love to answer if you ask correctly