Firefox3/ContentManagement:Handlers: Difference between revisions

no edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
One of the new features of Firefox 3 is the ability to map a [http://en.wikipedia.org/wiki/Url URL protocol segment] to either a website or local application.


This document attempts to document some of the commonly seen protocols on the net and offer some of the handlers that we may want to include as default options.
= Background =
One of the new features of Firefox 3 is the ability to use a web service as a content handler.  A complete functional description for this feature appears at http://wiki.mozilla.org/User:Dmose:Fx-Docs:ContentTypeProcessing.


Feature Functional description appears at http://wiki.mozilla.org/User:Dmose:Fx-Docs:ContentTypeProcessing.
To enable this feature, however, we need to create new mechanisms to augment the ones the operating systems provide for local applications:
* '''Registering''' -- How does Firefox know what web services can handle each content type?
* '''Defaulting''' -- When and which web services do we pick as defaults?
* '''Invoking''' -- How are these web services actually invoked?


= Protocols =
== Registration ==
There are two mechanisms by which a web service can become a registered content handler:
 
=== Pre-registered ===
Mozilla will maintain a list of pre-registered web service handlers.  This list will vary by locale, and will be determined by:
* (selection criteria TBD)
 
==== Dynamically Registered Handlers ====
Web sites can also register themselves as content handlers according to the [http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers What-WG Custom Handlers spec] by calling a javascript API.  For example:
 
<code>navigator.registerContentHandler('application/x-soup', 'http://example.com/soup?url=%s', 'SoupWeb™')</code>
 
== Defaulting ==
One of the pre-registered handlers will also be marked as the preferred handler, meaning that the first time a user encounters a content type, it will be the selected handler if there is no local application already registered for that content type.  The user will still be presented the full list of handlers to choose an alternate, however.
 
* (selection criteria TBD)
 
== Invoking ==
Registered web services will be invoked according to the [http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers What-WG Custom Handlers spec] and the URL pattern that was registered.  For example:
 
<code>http://example.com/soup?url=http%3A%2F%2Fwww.example.net%2Fchickenk%C3%AFwi.soup</code>
 
 
= Information needed for Pre-Registered Content Handler file =
 
== Protocols ==
 
=== "Complete" List ===
* [http://www.iana.org/assignments/uri-schemes.html IANA Official list?]
* [http://www.iana.org/assignments/uri-schemes.html IANA Official list?]
* [http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers What WG Handlers]
* [http://en.wikipedia.org/wiki/URI_scheme Wikipedia list of common URI Schemes]
* [http://en.wikipedia.org/wiki/URI_scheme Wikipedia list of common URI Schemes]


=== For Inclusion ===
{| class="fullwidth-table"
{| class="fullwidth-table"
!Protocol !! Candidate Apps/ Web Services !! Comments
!Protocol !! Candidate Web Services !! Comments
|-
|-
|colspan="3"| <b><i>Common</i></b>
|colspan="3"| <b><i>Common</i></b>
|-
|-
| file || Handled by Firefox ||
| mailto || Yahoo Mail, GMail, Hotmail ||
|-
|-
| http/https || Handled by Firefox||
| webcal || Google Calendar ||
|-
|-
| ftp ||Handled by Firefox||
| news/snews || Google News ||
|-
| mailto ||Yahoo Mail, GMail, Hotmail, WinOS MAPI, Mail.app, Thunderbird ||
|-
| webcal ||Google Calendar, Thunderbird, iCal||
|-
| news/snews || Google News, Thunderbird, ||
|-
|-
| irc/ircs || ||
| irc/ircs || ||
|-
|-
| rtsp || ||
| feed || Google, My Yahoo!, Bloglines ||
|-
|-
| feed || Handled by Firefox ||
|}
|-
| aim || AOL Instant Messenger ||
|-
| skype || Skype ||
|-
| mms || Windows Media Player ||
|-
| ymsgr || Yahoo Messenger ||
|-
|colspan="3"| <b><i>Rare</i></b>
|-
| gopher || Handled by Firefox ||
|-
| tel || Skype, other VOIP app? ||
|-
| telnet || ? ||
|-
| (See about:config, "protocol-handler" || ? ||
|-|}


= MIME Types & Filename Extensions =
== MIME Types & Filename Extensions ==


=== "Complete" List ===
* See https://addons.mozilla.org/en-US/firefox/addon/4498
* See https://addons.mozilla.org/en-US/firefox/addon/4498


=== For Inclusion ===
{| class="fullwidth-table"
{| class="fullwidth-table"
!Mime Type !! Extensions !! Candidate Apps/ Web Services !! Comments
!Mime Type !! Extensions !! Candidate Web Services !! Comments
|-
|-
|colspan="4"| <b><i>Common</i></b>
| application/rss+xml<br>application/atom+xml || || Google, My Yahoo, bloglines ||  separate audio-, video-, and image-oriented feeds by sniffing?
|-
|-
| application/pdf || pdf || Adobe Acrobat Reader ||
| || doc || ||  
|-
|-
| video/qt || qt || Apple Quicktime ||
| || ppt || ||  
|-
|-
|colspan="4"| <b><i>...</i></b>
| || xls ||  ||  
|-
|-
|}
| || ics || ||  
 
= RSS Feeds =
 
* Is this a separate beast?
 
{| class="fullwidth-table"
!RSS Type !! Candidate Apps/ Web Services !! Comments
|-
|colspan="3"| <b><i>Common</i></b>
|-
| ATOM, text/img || ? || Are there content indicators?
|-
| RSS 2, text/img || LiveBookmarks, Google, My Yahoo, bloglines, <ClientApp> || ?
|-
| RSS 2, Video? || Miro/Democracy Player, NetnewsWire? || ?
|-
|-
| RSS 1 || ? || ?
| || vcard ||  ||  
|-
|-
|}
|}


= Questions =
= Questions =
* Is there anyway to use the existing list of OS registered MIME types handler to add to the list used in Firefox?
* Is the list of pre-registered web service handlers part of the build or dynamically updated by checking an online master regularly?
** Yes. Currently the list ONLY consists of OS registered handlers, we are trying to add web based handlers to that list.
* Is there a need / use case for a web service to be the preferred handler, even if there ''is'' a registered local application?
* Is there anyway to detect if the local app is already installed before offering it as a choice?
* Need to discuss with web service providers how to deal with protected URLs (behind a log-in or firewall).
* Should we do/use a canonical lookup service like http://filext.com or http://www.webmaster-toolkit.com/mime-types.shtml?
** Downloading and then uploading seems like a bad option
*** Very slow / bad user-experience for large files
*** "Leakage" a huge security concern
** Ideally, it would be the web service provider's responsibility to figure out delegation model.
12

edits