Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to communicate with a desktop application from browser?

Tags:

Is it possible to communicate with a desktop application from browser?

I want to do something like this,

Let's say there is a button in my web application with a URL to a data source and when button is clicked desktop application opens and get that data source URL and process data with desktop application.

Is it difficult to do such thing? Any examples?

like image 691
Gihan Lasita Avatar asked Jan 24 '12 15:01

Gihan Lasita


People also ask

Can I open a desktop application from browser?

If the basic idea is to launch a desktop app from the web browser, the first step is to create a new Registry in Windows and path a URL Custom protocol. And if you need it you can also send parameters by changing console arguments in your app and append the parameters in your html file.

What is Desktop Application Browser?

Desktop apps are computer programs and don't need an internet connection in order to be used. A web application, on the other hand, doesn't require any installation and runs on your web browser. Contrarily to the desktop app, a web application needs an internet connection if you want to use it.

Can HTML be used for desktop applications?

Electron can be used to build Desktop Apps with HTML, CSS and Javascript. Also these apps work for multiple platforms like Windows, Mac, Linux and so on. Electron Combines Chromium and NodeJS into a single Runtime. This enables Us to run the HTML, CSS and Javascript Code as a desktop application.


1 Answers

On windows its trivial to create a custom URL Protocol that's invokable via

<a href="whatever://somedata">..</a>

This works in IE, FF and Chrome, although in the latter the link must be opened via javascript to avoid omni-bar confusion.

like image 61
Alex K. Avatar answered Sep 21 '22 17:09

Alex K.