W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2008

Re: [widgets] Content-type sniffing and file extension to MIME mapping

From: Jere Kapyaho <jere.kapyaho@nokia.com>
Date: Tue, 02 Dec 2008 17:19:38 +0200
To: ext Jonas Sicking <jonas@sicking.cc>, Marcos Caceres <marcosscaceres@gmail.com>
CC: public-webapps <public-webapps@w3.org>
Message-ID: <C55B1EAA.437E%jere.kapyaho@nokia.com>


On 2.12.2008 3.05, "ext Jonas Sicking" <jonas@sicking.cc> wrote:
> 
> Marcos Caceres wrote:
>> On Tue, Dec 2, 2008 at 12:22 AM, Jonas Sicking <jonas@sicking.cc> wrote:
>>> Marcos Caceres wrote:
>>>> On Mon, Dec 1, 2008 at 11:48 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>>>>> Marcos Caceres wrote:
>>>>>> Ok, hearing no objections, then I propose we bake in the following
>>>>>> file extensions into the spec (we can debate which MIME types to use
>>>>>> after we settle on the extensions!):
>>>>>> 
>>>>>> .html
>>>>>> .htm
>>>>>> .css
>>>>>> .gif
>>>>>> .jpeg
>>>>>> .png
>>>>>> .js
>>>>>> .json
>>>>>> .xml
>>>>>> .txt
>>>>>> 
>>>>>> The following we should probably bake in too:
>>>>>> .mp3
>>>>>> .swf
>>>>>> .wav
>>>>>> .svg
>>>>>> .ico
>>>>> I'm not a big fan of "endorsing" mp3 given that it's a patented format
>>>>> that
>>>>> can't be implemented by FOSS software.
>>>>> 
>>>>> / Jonas
>>>>> 
>>>> Ok, no MP3. maybe you can suggest some other suitable audio format?
>>> I'd stick with wav for now. Possibly also FLAC.
>> 
>> Ok, sounds good. I suppose flac has a .flac extension? (sorry, apart
>> from mp3 and wav, I don't know audio formats at all!)
> 
> I'm mostly in the same boat :)
> 
> But it does look like .flac is the preferred extension.
> 
> / Jonas
> 

Yes, it's .flac (or .fla in a pinch) for FLAC.

I was going to suggest to add .aac and .mp4, but if patented formats are
out, then I won't. However, isn't .swf equally patented, or has it been
liberated recently? (Or GIF? PDF?) It may not be feasible to discriminate
some file formats on that basis, especially if they do have a registered
MIME type.

I will nevertheless suggest the audio formats .ogg (open) and also .aiff.
And if patents shouldn't matter, also .mov, .wmv and .mp2.

But... maybe relying on file extensions is not the way to do it after all.
Extensions are not reliable, and not even mandatory on some systems. Since
the widget package is in a sense "sealed", a metadata list that connects
each filename inside a package to a MIME type would work with or without
file extensions. Or has this been discussed and dismissed already?

Example metadata list (format is simply <filename> WSP <mimetype>):

images/splashScreen.png image/png
music/themesong.flac audio/flac
favicon.ico image/vnd.microsoft.icon
main application/xhtml+xml

Note especially the last item, which has no file extension at all.

--Jere
Received on Tuesday, 2 December 2008 15:20:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:28 GMT