[whatwg] Page displayed during/after download (<meta refresh> downloads)

Kornel Lesiński kornel at geekhood.net
Fri Jul 22 16:09:54 PDT 2011

There is a design (anti)pattern related to file downloads: instead of  
linking to a file directly, websites use "Download" links pointing to a  
page with <meta refresh="5; url=actual URL to download"> (or equivalent  
javascript) and "Thank you!" text or further instructions how to use  
downloaded file (e.g. install an application).



This is problematic, because:

* it's hard or impossible to see or copy URL of the file (to download with  
another application, share URL, check if file type is correct by looking  
at the filename)

* Right-click and "Save As" on "Download now" links is unreliable and  
sometimes results in HTML downloaded

* "Thank you!" pages saved in browsing sessions cause files to be  
re-downloaded every time browser is restarted

* Extra pages and <meta refresh> cause unnecessary delays. "Your download  
will start in 5 seconds" is very annoying when download itself takes  
couple of seconds.

I wish this could be replaced with something that doesn't break download  

I think in terms of use-cases it can be expressed as:

1. Show users immediate and very clear feedback that the download is  
starting, even if browser's standard download UI is very subtle or appears  
only after the download server responds.

2. Allow website to show additional information about the download, while  
the download is taking place.

e.g. Instructions what to do with the file after it is downloaded. List of  
mirrors to use in case download is slow or fails. List of related products  
to upsell.

<a download> and UI improvements in browsers might partially cover use  
case #1, but I don't see an easy solution to #2, and partial improvement  
might not be enough to replace <meta refresh> download pages.

And I'm afraid that <meta refresh> also fulfils another case:

3. Make it harder for others to link directly to the file, force them to  
link to a branded landing page.

I think cases #1 and #2 could be satisfied with something like:

<a post-download-href="url of page to navigate to when download starts">

And to satisfy all three cases (without breaking links), it needs to be  
done at HTTP level, by adding HTTP header (or multipart response? or  
attribute to Content-Disposition?) that causes both file download to start  
and a page to be displayed at the same time.

regards, Kornel Lesiński

More information about the whatwg mailing list