Thursday, November 20th, 2008
Via Myk Melez comes word that Firefox 3 supports HTML 5 web protocol handlers, which I had not realized before. These are really nifty:
- "Example Mail");
This code creates a protocol handler for
www.example.com that makes
mailto links direct the user to the
www.example.com web application, inserting the link into the URL given replacing the
%s value. The final argument is the title of the protocol handler to present to the user.
There are obviously security limitations around this:
Note: Web sites may only register protocol handlers for themselves. For security reasons, it’s not possible for an extension or web site to register protocol handlers targeting other sites…The URL template supplied when registering must be of the same domain as the webpage attempting to perform the registration or the registration will fail. For example, http://example.com/homepage.html can register a protocol handler for http://example.com/handle_mailto/%s, but not for http://example.org/handle_mailto/%s.
The user will be prompted on whether they want to allow this protocol handler:
Now, when the user clicks on a link that has a registered protocol handler, they will be prompted on how to work with it:
Posted by Brad Neuberg at 7:00 am