Is there an equivalent of chrome's nativeMessaging API in Internet Explorer?

1.7k views Asked by At

On chrome, extensions can exchange messages with native applications with the help of native messaging APIs How can we achieve this on IE?

use-case : We have our own desktop application which users can download and install from our site. Next time when they revisit, we should be able to detect if the native application is installed and launch if its available.

We were able to build a solution on chrome with the help of an extension which makes use of chrome native messaging APIs to connect to native application.

Need something similar on IE browsers or a generic solution which will work across all major browsers.

2

There are 2 answers

1
Marged On

You might want to have a look at URL handlers, they are supported for Firefox, Chrome and Internet Explorer.

Basically it enables you to register for example myapp:// for the browser and then you can have the browser call the application that is registered to this handler. This is a technique which for example uTorrent uses to open trackers for torrent:// and magnet://.

You can check these links for details or search for solutions here on SO: https://developer.mozilla.org/en/docs/Web-based_protocol_handlers https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx https://developer.chrome.com/apps/manifest/url_handlers

0
Serg On

If you have the desktop application installed, you can just install the BHO in the IE. This BHO should handle Navigate events from the browser, then, when user navigates to your site, BHO will indicate to the site, that the your app is present on the system. For example, BHO can inject some "marker" node on the page or call some predefined JS function on the your site's page. Also this BHO can perform some additional communication with you desktop app via the COM (or you can emulate manually int the BHO the protocol used in Chrome native messaging) and use the same approach as for Chrome.