javascriptcustom-protocol

How To Tell Whether a Protocol is Valid In Javascript


Possible Duplicate:
How to detect browser's protocol handlers?

A certain software (non-browser based) installs a custom protocol when it is installed. Thus, if the software is installed on the system, putting a link that looks like

<a href="mycustomprotocol:///foobar">Launch the program!</a> 

in a web page launches the software when clicked (after putting up a warning of course).

If the software is not installed I want to dynamically change the element so that the browser does not try to launch it.

Is there a way in javascript to detect whether a protocol is valid? Would like it to work in at least Firefox, IE, Chrome and Safari.

Thanks


Solution

  • There is no way for JavaScript to access a user's desktop file system or registry to validate a custom protocol.