by Turing_Machine · 12y ago · 0 comments
For those who aren't familiar with the problem, say you've written a cool web app that creates (just for example) ZIP files. You want to let the user save these to disk. In Chrome, Firefox, or Opera, this is dirt-simple. Put the ZIP data in a data URL, set the href attribute of the link to the data URL, and set the download attribute to "yourcoolfilename.zip" (or whatever you want). Boom. Done. User clicks the link, data downloads to "yourcoolfilename.zip". Totally streamlined.
Not in Safari. The best you can do there is open up the data URL in a new window (which of course ignores any mime type you've set, so the user gets an ugly screen full of binary data) and tell them to use Save As to save the mess. Very nasty.
Chrome has had this feature for 20 (!) versions, Firefox for 9, Opera for 5. It even works on the Android and Blackberry browsers.
Even IE allows this (in a completely non-standard and convoluted way, naturally, but it can be done).
You make it sound like this downloading ZIP and other files aren't possible on Safari.
Which is true.
Edit: a simple illustration of the problem.