Sune Rasmussen
Sune Rasmussen

Reputation: 954

Programmatically change Chrome extension update frequency

I'm developing a Chrome App (as a packaged app/extension) which purpose is to act as the base platform for several fullscreen apps to be build on top of. Chrome will be running on Ubuntu Linux.

And no trouble so far. But then I was told, that an intended app it is to be the platform for requires the source code to be updated with very short notice, as it probably is to be deployed for large scale use before the system has been tested through (even though it's a bad idea to deploy software that's not completely stable, but we're on a tight schedule). The problem is, that the "a few hours" interval for the autoupdating mechanism just isn't good enough.

So I somehow need to have the updating interval changed. I know this can be done with the --extensions-update-frequency command line switch, but as apps cannot access the command line (for obvious security reasons), and I'd prefer that the intended background page was to handle all the "administration", I don't think that switch is possible to use.

Is it somehow possible to update at a higher frequency? Or at times when it's ordered to?

Upvotes: 2

Views: 3029

Answers (2)

Xan
Xan

Reputation: 77523

There is now a method chrome.runtime.requestUpdateCheck():

Requests an update check for this app/extension.

It will return a status, which can be either "no_update", "update_available" or "throttled".

Unfortunately, the docs do not specify the limits for frequency that will trigger "throttled".

Upvotes: 6

abraham
abraham

Reputation: 47833

Your best option will be to have the extension manually check with your servers for an updated version. If there is an updated version show the user a desktop notification to manually update.


Potentially you could write a NPAPI plugin to modify the update frequency.


This may cause issues with CSP but you can try to live load JavaScript from your server that executes in the extension. In this case to "update" your extension you would simply update the JS hosted on your servers and the extension would automatically start using it on next load.

Upvotes: 2

Related Questions