5 ms·
Biggest deal here (for me) is the HTML 5 download attribute. Without that you cannot name or provide an extension for files that are triggered for download.
by tbrock 10y ago
Biggest deal here (for me) is the HTML 5 download attribute.
Without that you cannot name or provide an extension for files that are triggered for download.
- icefox 10y agoNow if we can just get every company that lets you download monthly statements to fill out this field I would be very happy.
- eridius 10y agoThe server can do this with the Content-Disposition header. The `download` attribute just lets you trigger downloads (optionally with a filename) for URLs that otherwise wouldn't be downloaded.
- AshleysBrain 10y agoIt's important to download JS-generated data as well, such as something in a Blob. You can't set a HTTP header on local content. The 'download' attribute lets the user "download" that without having to wastefully post it to a server and back.
- Turing_Machine 10y agoTo make what AshleysBrain said a little more concrete, imagine an image editor program (or a music editor, or a word processor, or whatever) that's written completely in client-side JS. There are starting to be a lot of these, actually. Without a working download attribute, the only way to save your work is to post it back to the server and redownload it. That is a slow, ugly, and unsatisfying hack to get data that's actually already present on the local machine. Even IE 11 has a way to do this (non-standard, of course, but it does have a way to do it :-). Edge supports the standard way. As I noted in a different post, though, support for the download attribute has already landed in Webkit Nightly for macOS, and is apparently being worked on for iOS.
- deleted 10y ago[deleted]
- therealmarv 10y agoSurprised and shocked that this is not already included in Safari. I use the download attribute on some CDN and it would not download with it (tried everything). So today I learned it would not work on actual Safari :(
- Turing_Machine 10y agoThat's actually already in the Webkit Nightly for macOS, and the task has been assigned for iOS. So... it's coming.
- toyg 10y agoAbout freaking time, I've been waiting three years for this...