W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Indicate a file name for data: URLs?

From: Glenn Maynard <glenn@zewt.org>
Date: Sat, 30 Apr 2011 14:11:34 -0400
Message-ID: <BANLkTi=6hffnHr2PsUt27BjwHs3s6gZpaw@mail.gmail.com>
On Sat, Apr 30, 2011 at 1:26 PM, Bjartur Thorlacius
<svartman95 at gmail.com> wrote:
> On 3/21/11, Philip J?genstedt <philipj at opera.com> wrote:
>> On http://foolip.org/microdatajs/live/#json I have a "Download it!"
>> function which uses data: URLs to save JSON generated by JavaScript. The
>> only real limitation with this approach is that one cannot suggest a file
>> name, so in Opera the suggested file name is "default".
>>
> Sorry for my na?vety, but does there need to be a suggested file name?

Yes.  A basic element of clicking a link to save it is giving a
reasonable default filename.

On systems where the file type is determined by the extension
(Windows), it's also critical that the browser know what a reasonable
default extension is, including for proprietary file types not known
to the browser.  It's no good to have to tell users "if you're in
Windows, be sure to save this file with the following extension, since
browsers give us no way of making this happen automatically".

-- 
Glenn Maynard
Received on Saturday, 30 April 2011 11:11:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT