I am writing a gmail contextual gadget. Having traversed this minefield I am stuck on an issue no one else seems to have, my UserPreferences only save on page refresh, if I simply navigate back to the inbox and to another email they are forgotten. I have the user prefs enabled:
<Require feature="setprefs"/>
They look like this:
<UserPref name="enabled"
datatype="hidden"
default_value="true">
</UserPref>
I have tried initializing my prefs with and without the module id:
var prefs = new gadgets.Prefs();
or
var prefs = new gadgets.Prefs(__MODULE_ID__);
I even forced a refresh with javascipt on the iframe/gadget and that didn't work either, making me believe that the issue is with google caching the old data for me and not saving it until the page is closed, if that makes any sense.
And I am using /?nogadgetcache=1/
in my url