浏览器“帮助应用程序”跨浏览器和操作系统

发布于 2024-11-12 04:01:35 字数 524 浏览 5 评论 0原文

我想了解跨浏览器 HTML Web 应用程序将用户操作通知和下载文件内容发送到多个操作系统上的外部应用程序的最佳方式的建议。我可以使用仅限 Windows 的外部应用程序,但不能使用仅限 IE 的外部应用程序。

我能想到的最简单的解决方案是让外部程序充当浏览器“帮助应用程序”,接收下载(内容处置:内联)作为消息,并处理下载的内容。因此,用户可以单击链接,结果将是下载的文件,该文件将由浏览器根据内容类型立即分派到适当的应用程序。随后的单击会将新文件发送到外部帮助程序的同一实例。

但有关如何配置帮助应用程序的文档充其量是参差不齐的,而且似乎通过下载来实现浏览器到外部应用程序消息传递将非常特定于浏览器和平台。搜索“浏览器“帮助程序应用程序””会产生旧的、太初级的结果,或者讨论 MS 的“浏览器帮助程序对象”(非常感谢 MS 重载术语“浏览器帮助程序”。)

另一个想法是创建一个拦截用户操作、格式化消息并在外部应用程序正在侦听的套接字上写入的插件。

我希望获得设计建议、有关如何配置帮助应用程序的权威文章的链接(令人惊讶的是很难找到)或代码示例。

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

飘过的浮云 2024-11-19 04:01:35

下载肯定是 content-disposition:attachment; 吗?无论如何,只要您的应用程序使用适当的 MIME 类型进行注册,就会提供打开下载的选项。即使不是,我认为您仍然可以从列表中选择它,然后从那时起将其设置为默认选择。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文