浏览器插件自动更新流程?

发布于 2024-12-21 00:43:02 字数 200 浏览 3 评论 0原文

我很好奇所有浏览器插件(NPAPI 和 ActiveX)开发人员使用什么方法自动更新插件(在​​ Windows 和 OSX 平台上)?

我的最终目标是使插件的安装尽可能简单(即,不需要用户安装自动更新所需的附加软件 - 所以它必须是与插件本身集成的人,或者至少无论如何,对于 Windows,我可能可以在 OSX 上摆脱它)。

任何想法或提示表示赞赏!

I'm curious for all you browser plugin (NPAPI & ActiveX) developers out there what methods you've used for automatically updating your plugins (on both Windows and OSX platforms)?

My end goal would be to make the installation of the plugin as simple as possible (ie, not require the user to install additional software needed to auto-update - so it'd have to be someone integrated with the plugin itself, or at least for Windows anyway, I can probably get away from that on OSX).

Any thoughts or tips are appreciated!

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

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

发布评论

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

评论(1

梦途 2024-12-28 00:43:02

这是我用于 3 个浏览器的更新过程:IE、Chrome 和 Firefox

Internet Explorer

在您的 元素中,您可以将版本附加到您的 cab 文件名中。如有必要,将自动下载新的 cab。

示例:

如果插件在单个网页上使用,这适用于。如果您的插件打算分布在多个网站上,请将最新版本字符串存储在托管插件的服务器上,并且每个网站都可以在加载和更新代码库时请求它。

FireFox

我不会在这里解释完整的 Firefox 更新过程,但基本上有两个文件:install.rdfupdate.rdf

第一个嵌入到插件包中,并包含 update.rdf 文件的 URL。当插件包更新时,只需更新 update.rdf 文件,Firefox(如果配置正确)将自动检查该文件并下载并安装新的文件。

Chrome

与 Firefox 非常相似,您的插件必须链接到指向最新插件的 xml 文件。

This is the update procedure I use for 3 browsers: IE, Chrome and Firefox

Internet Explorer

Inside your <object codebase="" ... /> element, you can append the version to your cab filename. The new cab will be automatically downloaded if necessary.

Example : <object codebase="myPlugin.cab#Version=X,Y,Z" ... />

This is suitable if the plugin is used on a single webpage. If your plugin is meant to be distributed accross multiple websites, store the latest version string on the server hosting your plugin and every website can ask for it on loading and update the codebase.

FireFox

I am not going to explain the full Firefox update process here, but basically, there are two files : install.rdf and update.rdf.

The first one is embedded into the plugin package and contains a URL to the update.rdf file. When the plugin package is updated, just update the update.rdf file and firefox (if correctly configured) will check automatically this file and download then install the new one.

Chrome

Very close to Firefox, your plugin must link to an xml file that points to the lastest plugin.

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