Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The way the server sends the file, and the way the browser is configured to use it depend on the action that the browser will take. The link itself has no input on this. </p> <p>You need to look at <a href="http://en.wikipedia.org/wiki/MIME" rel="nofollow">mime types</a>, and how they're used within HTTP Headers. </p> <p>By way of example: </p> <ol> <li>I click on a link to www.example.com/song.mp3, my browser sends a request to the server. </li> <li>The server sends back the file with a <a href="https://en.wikipedia.org/wiki/List_of_HTTP_header_fields" rel="nofollow">http header</a> saying <code>content-type: audio/mp3</code></li> <li>My browser looks to see if it has anything that can deal with that file. If it does, it may play the file directly. (This is what happens for html, and pictures) </li> <li>If the browser is unable to find a handler then it may prompt you to save the file (or perhaps just start saving the file automatically). </li> </ol> <p>To force the 'download' behavior, you can either configure the server to send a mimetype that the browser won't handle automatically. This approach can generally be done on a server configuration level. Note that you have no control over what the browser does, and some browsers may still try to handle the file anyway.</p> <p>Alternatively, you can send the file as an attachment, if you set the content-disposition header, like <code>Content-Disposition: attachment; filename="song.mp3"</code>. This approach generally requires some form of code (eg php, asp.net, ruby, etc) to do this behaviour. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload