DEV Community

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

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
 
joshcheek profile image
Josh Cheek

A 303 response code feels simpler to me.

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.