• tag for download only

    From Osmo Saarikumpu@21:1/5 to All on Thu May 21 14:33:01 2020
    (This is a copy of the orig. sent to the OP via mail by mistake.)

    On 24/04/2020 11:31, François Patte wrote:
    Bonjour,

    Is there a tag for download only?

    Not to my knowledge, but there's a download attribute that you may slap
    to an <a> or <area> element in order to suggest a download, e.g.:

    <a download href="myvideo.mp4"> ... </a>

    and adding value to the attribute works as a suggestion for the filename
    to be saved, e.g.:

    <a download="whatever.mp4" ...> ... </a>

    The browser support situation:

    https://caniuse.com/#feat=download

    And the fine print:

    https://html.spec.whatwg.org/multipage/links.html#downloading-resources

    --
    Best wishes, Osmo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas 'PointedEars' Lahn@21:1/5 to All on Sat May 23 03:01:38 2020
    François Patte wrote:

    If I add in a .htaccess file:

    <FilesMatch "\.(pdf|mp3)$">
    Header add Content-Disposition: "Attachment"
    </FilesMatch>

    as suggested in your previous mail,

    This is Network News. It was an article/follow-up, not a(n) (e-)mail.

    this has no effect.

    The syntax is wrong. It should be

    Header add Content-Disposition "attachment"

    The recommended syntax is

    Header append Content-Disposition "attachment"

    in order to avoid “unforeseen consequences”.

    RTFM: <https://httpd.apache.org/docs/2.4/mod/mod_headers.html#header>
    RTFSpec: <https://tools.ietf.org/html/rfc6266#section-4.2>

    However, forcing the download as a file is a BAD idea, *especially* for
    video and audio files. If you do not force me to download the file, I can
    use my browser plugin to stream your video or audio instead: I can already watch it/listen to while it preloads in the background, and if I like it so much that I want to keep it, I can still download it as a file. On the
    other hand, I may have a browser plugin but not have an app to view the
    file.

    --
    PointedEars
    FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
    Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arno Welzel@21:1/5 to All on Sat May 23 15:47:59 2020
    Thomas 'PointedEars' Lahn:

    [...]
    However, forcing the download as a file is a BAD idea, *especially* for
    video and audio files. If you do not force me to download the file, I can use my browser plugin to stream your video or audio instead: I can already watch it/listen to while it preloads in the background, and if I like it so much that I want to keep it, I can still download it as a file. On the
    other hand, I may have a browser plugin but not have an app to view the
    file.

    You underestimate the lack of knowledge of users. Many people either
    don't know that there is a "context menu" for links and especially on
    mobile devices I would not expect that visitors are aware that they can
    not only open links by tapping them.

    One possible usecase:

    There are *two* links. One just links to the file without any specific Content-Disposition header and the other one is labeled with "Download
    this file" and serves the same content with a different
    Content-Disposition header.


    --
    Arno Welzel
    https://arnowelzel.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas 'PointedEars' Lahn@21:1/5 to Arno Welzel on Mon May 25 03:35:12 2020
    Arno Welzel wrote:

    Thomas 'PointedEars' Lahn:
    [...]
    However, forcing the download as a file is a BAD idea, *especially* for
    video and audio files. If you do not force me to download the file, I
    can use my browser plugin to stream your video or audio instead: I can
    already watch it/listen to while it preloads in the background, and if I
    like it so much that I want to keep it, I can still download it as a
    file. On the other hand, I may have a browser plugin but not have an app
    to view the file.

    You underestimate the lack of knowledge of users.

    Nonsense.

    Many people either
    don't know that there is a "context menu" for links and especially on
    mobile devices I would not expect that visitors are aware that they can
    not only open links by tapping them.

    Have you even read what I posted?

    *facepalm*

    --
    PointedEars
    FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
    Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arno Welzel@21:1/5 to All on Mon May 25 16:49:55 2020
    Thomas 'PointedEars' Lahn:

    Arno Welzel wrote:

    Thomas 'PointedEars' Lahn:
    [...]
    However, forcing the download as a file is a BAD idea, *especially* for
    video and audio files. If you do not force me to download the file, I
    can use my browser plugin to stream your video or audio instead: I can
    already watch it/listen to while it preloads in the background, and if I >>> like it so much that I want to keep it, I can still download it as a
    file. On the other hand, I may have a browser plugin but not have an app >>> to view the file.

    You underestimate the lack of knowledge of users.

    Nonsense.

    Many people either
    don't know that there is a "context menu" for links and especially on
    mobile devices I would not expect that visitors are aware that they can
    not only open links by tapping them.

    Have you even read what I posted?

    And you?

    Maybe you read it again:

    One possible usecase:

    There are *two* links. One just links to the file without any specific Content-Disposition header and the other one is labeled with "Download
    this file" and serves the same content with a different
    Content-Disposition header.

    Can you tell me what is wrong with this usecase?



    --
    Arno Welzel
    https://arnowelzel.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)