且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

firebreath插件更新后刷新

更新时间:2023-12-03 14:20:10

这是一个很困难的技巧,可能会以很多不同的方式出错.我很难猜测具体可能出了什么问题,特别是因为您说的是在 Windows 上",但您没有指定那是什么浏览器.所有浏览器都以微妙的方式工作,而 IE 和其他浏览器在这一点上完全不同.

This is a difficult trick that can go wrong in a lot of different ways. It's difficult for me to guess what might be going wrong specifically, particularly since you said "on windows", but you haven't specified what browser that is. All of the browsers work differently in subtle ways and IE and the others are completely different as far as this goes.

你可以尝试的事情:

  • 使用 setTimeout 在从 DOM 中删除插件和重新添加它之间添加一个小的延迟
  • 打开 about:plugins,然后通过 shift-refresh 来查看它是否选择了新版本
  • 尝试不同的浏览器,看看行为是什么
  • 使用 Process Monitor 监控注册表的查询并查看访问注册表项时;使用它来帮助您规划策略.
  • use setTimeout to add a small delay between removing the plugin from the DOM and re-adding it
  • open about:plugins and then shift-refresh to see if it picks up the new version
  • Try different browsers and see what the behavior is
  • Use Process Monitor to monitor the queries of the registry and see when the registry keys are being accessed; use this to help plan your strategy.

无论如何,我希望其中有一些帮助;我曾经以这种方式升级,但它太容易出错并且太容易随着新浏览器的变化而改变,所以现在我只是让客户端在升级时重新启动他们的浏览器.它节省了很多麻烦和很多的开发时间.

Anyway, I hope some of that helps; I used to upgrade that way but it was too error prone and too prone to things changing with new browsers, so these days I just make the client restart their browser on upgrades. It saves a lot of hassle and lots of development time.