开发者

Browser "helper applications" across browsers and OSes

开发者 https://www.devze.com 2023-03-10 05:37 出处:网络
I would like suggestions on the best way for cross-browser HTML web apps to send notifications of user actions and the contents of downloaded files to external applications on multiple OSes. I can liv

I would like suggestions on the best way for cross-browser HTML web apps to send notifications of user actions and the contents of downloaded files to external applications on multiple OSes. I can live with Windows-only external apps, but not IE-only.

The simplest solution I can come up with is for the external program to act as a browser "helper application", receiving downloads (Content-disposition: inline) as messages, and processing the downloaded content. So a user could click a link, and the result would be a downloaded file that would be immediately dispatched by the browser, based on Content-type, to the appropriate application. Subsequent clicks would send new files to the same instance of the external helper program.

But the documentation on how to configure helper applications is spotty at best, and it seems like getting browser-to-external-app messaging working via downloads will be very browser- and platform-specific. Searching for 'browser "helper application"' produces results that are old, too rudimentary, or discuss "Browser Helper Objects" from MS (thanks so much to MS for overloading the term "browser helper".)

The alternate idea 开发者_如何学编程was to create a plugin that intercepts user actions, formats messages, and writes on a socket where the external app is listening.

I'd appreciate design suggestions, links to definitive articles about how to configure helper apps (surprisingly hard to find), or code samples.

Thanks


Downloads would be content-disposition: attachment; surely? Anyway, as long as your application registers itself with the appropriate MIME type it will be offered as a choice to open the download. Even if it isn't, I think you still get to select it from a list, and then set it as the default choice from then on.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号