Making a Cross-Platform Cross-Manufacturer Browser Plugin?

  • Thread starter Thread starter Chris Shearer Cooper
  • Start date Start date
C

Chris Shearer Cooper

Sorry for the cross-post, not sure where to put this question ...

I need to make it possible for the user to control my application via a
browser, and I realize one of my options is to write a browser plugin for
every version of every browser on every platform, but then a friend pointed
out that BitTorrent had actually created its own protocol (torrent://) and
somehow registered it so the browser knew where to go when a URL with that
prefix appeared.

Can I use this to make a more generic interface to my application? That is,
can I somehow register with Windows that my application provides the narg://
protocol, and then write JavaScript stuff that talks to URLs with the
narg:// protocol?

Thanks!
Chris
 
Chris Shearer Cooper said:
I need to make it possible for the user to control my application via
a browser, and I realize one of my options is to write a browser
plugin for every version of every browser on every platform, but then
a friend pointed out that BitTorrent had actually created its own
protocol (torrent://) and somehow registered it so the browser knew
where to go when a URL with that prefix appeared.

Can I use this to make a more generic interface to my application?

See

http://msdn.microsoft.com/workshop/networking/pluggable/overview/appendix_a.asp

I know Internet Explorer and Firefox honor these registry settings.
Don't know about other browsers.
That is, can I somehow register with Windows that my application
provides the narg:// protocol, and then write JavaScript stuff that
talks to URLs with the narg:// protocol?

What do you mean by "talk" ? A script could launch your application
simply by instructing the browser to navigate to such a URL (or you
could simply put a link on a page and have the user click it). The URL
is then passed to your application on the command line. That's it -
there is no channel of communication opening between the browser and the
app, it's a one-time one-way shot.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
 
I had hoped it would work like other COM things Microsoft likes to do, where
it launches a COM interface (which, if my application is already running,
and then passes the URL to a function on that interface.

The way I had hoped to get things to "talk" is to have the browser request a
page over my protocol, and have my application return data in the response
to that protocol - in the same way that the browser makes HTTP requests.
So, for example, if some JavaScript in the browser could request the page
"narg://whats_your_status" and my application could return some information
to the JavaScript, now we've got something!

Chris
 
Chris Shearer Cooper said:
I had hoped it would work like other COM things Microsoft likes to
do, where it launches a COM interface (which, if my application is
already running, and then passes the URL to a function on that
interface.

Well, Microsoft likes to do COM, but other browser vendors don't. So if
you want a solution working without modifications with non-Microsoft
browsers, it can't be based on COM.
The way I had hoped to get things to "talk" is to have the browser
request a page over my protocol, and have my application return data
in the response to that protocol - in the same way that the browser
makes HTTP requests.

With Internet Explorer, you can implement Asynchronous Pluggable
Protocol for that. Firefox has its own API for pluggable protocols. I
don't believe it can be done in a way portable between different
browsers.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
 
Back
Top