List Info

Thread: prefs.set() and cookies




prefs.set() and cookies
user name
2006-05-31 21:57:53
Hello again,

Is there a way to have the prefs.set() function store the
information
in cookies as well as trying to upload to the ig server?  I
find that
if I use prefs.set() and it doesn't manage to update the ig
server,
when I come back to the page, the prefs are back to the old
settings.

It makes sense that you want to keep all the prefs info on
the server,
but there's no reason to not store them locally as a cookie
before
trying to upload them, so that if the internet is slow, at
least the
same computer's version of the ig page won't change
between loadings.

If there is no built in functionality for this, and there
are no plans,
I can write a javascript function that loops through the
prefs array
and stores a cookie, and then runs the prefs.set() for each.
 I could
also write a function that you run on loading of the gadget
that gets
the cookie info and runs the set() function right away.  Of
course,
then you'd need a hidden "timestamp" variable
to know whether to use
the cookie or the server prefs.

-Jack


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Google Homepage API" group.
To post to this group, send email to Google-Homepage-APIgooglegroups.com
To unsubscribe from this group, send email to
Google-Homepage-API-unsubscribegooglegroups.com
For more options, visit this group at ht
tp://groups.google.com/group/Google-Homepage-API
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )