浏览器插件自动更新流程?
我很好奇所有浏览器插件(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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我用于 3 个浏览器的更新过程:IE、Chrome 和 Firefox
Internet Explorer
在您的
示例:
如果插件在单个网页上使用,这适用于。如果您的插件打算分布在多个网站上,请将最新版本字符串存储在托管插件的服务器上,并且每个网站都可以在加载和更新代码库时请求它。
FireFox
我不会在这里解释完整的 Firefox 更新过程,但基本上有两个文件:
install.rdf
和update.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
andupdate.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.