Re: [crx] Extension Updating - Background Page Cached

238 views
Skip to first unread message

Matt Perry

unread,
Oct 30, 2012, 2:45:57 PM10/30/12
to Tanner Smith, Chromium-extensions
This sounds like http://code.google.com/p/chromium/issues/detail?id=111623 . If you have any additional information (especially any way to make it reproduce more consistently), please add it to the bug.


On Mon, Oct 29, 2012 at 8:18 AM, Tanner Smith <tannerl...@gmail.com> wrote:
Hi all,

I'm working on developing a new version of my extension which involves significant changes to how the background page (persistent) works. In my tests from upgrading from version 1 of my extension to version 2, I have found that the background page remains cached, i.e. the background page is still v1 code, while the rest of the extension appears to have upgraded. Reloading the extension or restarting Chrome appears to force the background page to be cleared.

I have code that is reliant on the background page (e.g. my extension's new tab page). Thus when the background page is cached, the extension's new tab page does not continue to work.

 I have added code that will reload the background page on an update, but this code is very much a hack (see below).

var background = chrome.extension.getBackgroundPage();
background.location.reload();

I have searched the group and the web, but I did not find any relevant threads about this topic. This "bug" is making the upgrade from version 1 to version 2 an undesirable user experience as the user will not be able to use the update for a period of time after the update, because the background page is cached.

Any help would be appreciated.

Thanks
-Tanner

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/nrs-O5MqKecJ.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.

Scott Fujan

unread,
Oct 30, 2012, 3:51:18 PM10/30/12
to Matt Perry, Tanner Smith, Chromium-extensions
I have definitely noticed this, but only while developing. The reload link would not update the background page to the newest version, though content scripts and other code would. I had to disable and re-enable the extension to refresh it. However, I don't know how to reproduce it.
Reply all
Reply to author
Forward
0 new messages