[Greasemonkey] GM_setValue limit?

Nikolas Coukouma lists at atrus.org
Mon Jul 18 14:22:08 EDT 2005


Tom Lee wrote:

>Hi folks.  I'm working on a script that has larger-than-usual storage
>requirements  -- I need the ability to store as many as, say, 10,000
>characters within a single GM_setValue value.  Tests with shorter
>strings work fine, but when a long string is used, no value is
>recorded in the about:config dialog.  It appears that the value
>remains set within the script's scope, but doesn't persist beyond a
>page reload or change of location.
>
>Can anyone tell me about the limits of the GM_setValue() method (I've
>been unable to turn up relevant documentation)?  Are there other
>limitations to the preference storage system that would make spanning
>a single large string across multiple pref. entries a bad idea?  Am I
>going to have to bite the bullet and make this a full-fledged
>extension?
>
>Thanks for any insight you can provide.
>
Interesting. The prefereneces system just uses c-style char* internally,
so there shouldn't be a limit. I'll have to dig some and see if this is
a limitation of XPConnect or something the pref system imposes
internally. I also seem to recall Mark Pilgrim having some trouble with
caching entire pages.

-Nikolas Coukouma


More information about the Greasemonkey mailing list