Domanda

I made a plugin for the browser to firebreath (Windows). Now I do update the plugin - but dll plugin can not be upgraded until the plugin is loaded.

How do I restart the browser to refresh the plug-in? or as a plug-in that can be downloaded from the browser cache?

È stato utile?

Soluzione

The options i see are:

  • tell the user to restart the browser after installation/update
  • tell the user to close the browser(s) before proceeding with installation

Note that you still may have issues replacing the DLL. What e.g. Flash does is suffixing their filename with the version (e.g. npYourPlugin_1_2_77.dll), so file locks are no issue.

If you do that you might not even need to restart the browser when you can call navigator.plugins.refresh() (works since Firefox 17, not sure about other browsers though).

Also note that i'm not sure about the ActiveX plugin (IE) if you need to support that as well - maybe taxilian will chime in on that and other scenarios i haven't run into myself.

Altri suggerimenti

The steps of upgrading my firebreath plugin is

  1. Make the plugin installer by NSIS.
  2. In the begining of installing, detect whether the plugin is occupied by any browser or not.
  3. Closing all browsers who are using the plugin at the moment.
  4. Uninstall the previous version of pluin.
  5. Install the new version of plugin in the folder with latest version number.
  6. At the end of installing, restart browsers that is closed previously, and navigate to the URL you want.

By the way, just as Georg mentioned, you don't need to restart Chrome and Firefox after checking the version of the plugin, which means you have the routine to upgrade plugin and use the new one immediately. However, you have to restart IE, as when you get the version of an activex control, you have to instantiate it, which makes the plugin loaded first.

Right now, it work well and as expected.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top