Steps to creating a browser standard for the moz-icon:// scheme

Hi, I'm doing some development on the Chromium project and have been in the
discussion with Chromium developers regarding the possibility of adding a
new web scheme for requesting platform icons. This idea was inspired by
Mozilla's moz-icon:// URI scheme which works as such:

What *is* a moz-icon URI you ask?  Well, it has the following syntax:


> moz-icon://[<file-uri> | <file-with-extension> | <stock-image>]?
> ['?'[<parameter-value-pairs>]]


> <file-uri> is a legal file: URI spec.  You only need to specify a file: URI
> inside the icon

if the file you want the icon for actually exists.


> <file-with-extension> is any filename with an extension, e.g. "dummy.html".

If the file you want an icon for isn't known to exist, you can omit the file
> URI, and just

place a dummy file name with the extension or content type you want:
> moz-icon://dummy.html.


> <stock-image> is of the format:   stock/<icon-name>


> <icon-name> is a valid icon name, such as 'ok', 'cancel', 'yes', 'no'.

XXXcaa Should these considered platform dependent or can we share and
> document them?


> Legal parameter value pairs are listed below:


> Parameter:   size

Values:      [<integer> | button | toolbar | toolbarsmall | menu | dialog]

Description: If integer, this is the desired size in square pixels of the
> icon

Else, use the OS default for the specified keyword context.


> Parameter:   state

Values:      [normal | disabled]

Description: The state of the icon.


> Parameter:   contentType

Values:      <mime-type>

Description: The mime type we want an icon for. This is ignored by stock
> images.


So in HTML a user can have:

<img src="moz-icon://unknown?size=16" alt="File:"/>

If opened in Firefox, the browser will provide an icon for the filetype. I
think this is a useful scheme that other browsers could benefit from. There
is a chrome://fileicon/<path> scheme in Chromium, however it is purely
internal and not exposed to the Web. I thought that having a standard
icon:// scheme of some sort would be the best approach rather than Chromium
and Mozilla having their own browser specific schemes for icon retrieval.

I would like to know whether this idea would be something that would warrant
the development of an open standard and, if so, how I would go about
proposing such a scheme.

Thanks for your time.

-- 
Pierre.

Received on Monday, 25 January 2010 02:29:45 UTC