Protocol Handlers are models that can be added to a user's computer to extend the range of protocols that can be handled by that computer.
- custom handlers in the W3C living HTML document.
The list of whitelisted schemes is defined by the WHATWG specification:
These are the providers registered as of 201x
|bitcoin"||Whitelisting bitcoin: URI handler in navigator.registerProtocolHandler()|
|"mailto"||It would be easy to start creation of an email by clicking on this, but it is not done.|
- 2020-05-08 Daniel B @ MSFT asked to add did because it was a W3C specification, but that spec is still not final on 2021-11-21.
- 2020-06-04 LGTM 1, 2 and 3 to add did to list
- fredric wang email 2020-08-03 did was added, but was not actually in the WHATWG spec on 2021-11-11
These solutions are directed primarily to Smartphones, although uses on desktop computers are also considered. Originally all protocol handlers were written in native code for the operating system and installed by the user.
Was a topic in BlinkOn 15 2021-11-17 now on YouTube
- Implement registerProtocolHandler on Android a CR bug issue 178097 originally posed on 2013-02-25
- Move ProtocolHandlerRegistry to a new //component in Chromium Gerrit
- Stephen Shankland twitter @stshank Google plans to add into Chrome the ability to handle decentralized web protocols (e.g. dat, dweb, ipfs, ipns, ssb). Decentralized web = more of a peer-to-peer design, where individuals host their own content. https://t.co/W05X4ljZUe?amp=1
- Intent to Prototype and Ship: Add schemes for decentralized web protocols to the safelist of registerProtocolHandler from Frederic Wang at igalia.com 2020-04-24
The following are features of enterprise installation as so would be a challenge to provide for other implementations, like for federations.
- PWAs as URL Handlers for the web.dev web page 2021-01-29 report by Thomas Steiner.
- URL protocol handler registration for PWAs a GitHub repository from Thomas Steiner.
- github site which should have current data on the progress
- Launcher Class Starts the default app associated with the specified file or URI.
- Registering an Application to a URI Scheme 2016-07-13
The following adapts their example:
First, you need a ProgID in HKLM\SOFTWARE\Classes that dictates how to handle any input given to it (yours may already exist):
HKLM\SOFTWARE\Classes MyApp.ProtocolHandler //this is the ProgID, subkeys are its properties (Default) = My Protocol //name of any type passed to this DefaultIcon (Default) = %ProgramFiles%\MyApp\MyApp.exe, 0 //for example shell open command (Default) = %ProgramFiles%\MyApp\MyApp.exe %1 //for example
Then fill the registry with DefaultProgram info inside a Capabilities key:
HKLM\SOFTWARE\MyApp Capabilities ApplicationDescription URLAssociations myprotocol = MyApp.ProtocolHandler //Associated with your ProgID
Finally, register your application's capabilities with DefaultPrograms:
HKLM\SOFTWARE RegisteredApplications MyApplication = HKLM\SOFTWARE\MyApp\Capabilities
Now all "myprotocol:" links should trigger %ProgramFiles%\MyApp\MyApp.exe %1.