javascriptinternet-explorerbrowserprotocolsmoniker

JavaScript - Protocol handlers registered but, reading fails from windows registry


I did following:

1) In Windows 7: Under registry: HKEY_CLASSES_ROOT\PROTOCOLS\Handler I have my custom protocol calls: stackoverflow (copied similar way in registry like other protocols mailto or ftp etc)

Followed

2) Open in IE the sample: http://jsfiddle.net/L528u/

<a href="stackoverflow:talking" id="link1">CLICK IT</a>
<button onclick="alert(document.getElementById('link1').protocolLong);">CHECK - IF - Protocol available or not</button>

3) when click the button from IE to detect the protocol: stackoverflow it fails

I get always alert box: "Unknown protocol" but when i try to detect protocols like: ftp, mailto it works

<a href="ftp:talking" id="link1">CLICK IT</a>
<button onclick="alert(document.getElementById('link1').protocolLong);">CHECK - IF - Protocol available or not</button>

Question: Can anyone please tell me what is missing in registry entry for to activate the new protocol? "stackoverflow" (where ftp, mailto works but not stackoverflow)


Solution

  • Internet Explorer only surfaces built-in protocols via protocolLong. There isn't anything you can put in the registry to allow web-based detection of Application Protocols.