Gecko.handlerService.schemes.(protocol).*.uriTemplate: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
 
(Add links)
 
Line 2: Line 2:


==Background==
==Background==
Firefox 3 allows web pages to register themselves as protocol handlers. This allows, for example, all links starting with <code>mailto:</code> to be sent to a webmail provider, or all links starting with <code>webcal:</code> to be sent to an online calendar site. The information on these registrations is kept in [[mimeTypes.rdf]]
Firefox 3 allows [http://developer.mozilla.org/en/docs/Web-based_protocol_handlers web pages to register themselves as protocol handlers]. This allows, for example, all links starting with <code>mailto:</code> to be sent to a webmail provider, or all links starting with <code>webcal:</code> to be sent to an online calendar site. The information on these registrations is kept in [[mimeTypes.rdf]]


A set of preferences exists to “seed” the list of registered content handlers. Information from these preferences is copied into mimeTypes.rdf every time the browser sees a new version of content handlers. This preference is an enumerated preference: all preferences whose names start with ''gecko.handlerService.schemes.'' are read to generate the list of handlers. (For example: '''gecko.handlerService.schemes.webcal.0.name''' and '''gecko.handlerService.schemes.webcal.0.uriTemplate''' describe one handler for the <code>webcal:</code> protocol.)
A set of preferences exists to “seed” the list of registered content handlers. Information from these preferences is copied into mimeTypes.rdf every time the browser sees a new version of content handlers. This preference is an enumerated preference: all preferences whose names start with ''gecko.handlerService.schemes.'' are read to generate the list of handlers. (For example: '''gecko.handlerService.schemes.webcal.0.name''' and '''gecko.handlerService.schemes.webcal.0.uriTemplate''' describe one handler for the <code>webcal:</code> protocol.)
Line 25: Line 25:


==Related preferences==
==Related preferences==
* [[gecko.handlerService.defaultHandlersVersion]]
* [[gecko.handlerService.schemes.(protocol).*.name]]
* [[gecko.handlerService.schemes.(protocol).*.name]]
* [[gecko.handlerService.schemes.(protocol).*.uriTemplate]]


==See also==
==See also==
Line 34: Line 34:
* [http://wiki.mozilla.org/Firefox3/ContentManagement:Handlers Firefox 3/ContentManagement:Handlers (Mozilla Wiki)]
* [http://wiki.mozilla.org/Firefox3/ContentManagement:Handlers Firefox 3/ContentManagement:Handlers (Mozilla Wiki)]
* [http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers HTML 5 - 4.10.2 - Custom protocol and content handlers]
* [http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers HTML 5 - 4.10.2 - Custom protocol and content handlers]
* [http://starkravingfinkle.org/blog/2008/04/firefox-3-web-protocol-handlers/ Firefox 3 - Web Protocol Handlers (Mark Finkle’s blog)]
* [http://developer.mozilla.org/en/docs/Web-based_protocol_handlers Web-based protocol handlers (Mozilla Developer Center)]


[[Category:Preferences]]
[[Category:Preferences]]

Latest revision as of 02:21, 30 April 2008

Background

Firefox 3 allows web pages to register themselves as protocol handlers. This allows, for example, all links starting with mailto: to be sent to a webmail provider, or all links starting with webcal: to be sent to an online calendar site. The information on these registrations is kept in mimeTypes.rdf

A set of preferences exists to “seed” the list of registered content handlers. Information from these preferences is copied into mimeTypes.rdf every time the browser sees a new version of content handlers. This preference is an enumerated preference: all preferences whose names start with gecko.handlerService.schemes. are read to generate the list of handlers. (For example: gecko.handlerService.schemes.webcal.0.name and gecko.handlerService.schemes.webcal.0.uriTemplate describe one handler for the webcal: protocol.)

This preference determines the URI template for a content handler for a given protocol. Similar to bookmark keywords, the value can contain the string %s that is replaced with the rest of the link. If the value were http://example.com/?process=%s and the link were to protocol:sample-value, then the browser would be directed to http://example.com/?process=sample-value.

Possible values and their effects

A string used to generate the URI for a web-based protocol handler. If the string %s is present in the value, it is replaced with the rest of the link.

By default, the following preference and value exist:

gecko.handlerService.schemes.webcal.0.uriTemplate
http://handler-test.mozilla.org/webcal?url=%s

First checked in

2007-09-06 by Dan Mosedale

Has an effect in

  • Mozilla Firefox (trunk builds after 2007-09-06)

Related bugs

Related preferences

See also

External links