I am trying to store some information about the current user in a cookie for a google contextual gadget. This is to ensure that the gadget is not hitting the server every time it loads. It checks in a local cookie and then hits the server.

The information is unique for each user.

To make it unique, I am looking for the open_social_viewer id or email address or some id to make it unique. How do I do that at client side?

Thanks.

有帮助吗?

解决方案

You can use gadget's UserPrefs to save any unique info. Once you store info in UserPrefs it remains permanently associated with gadget.

You can find more info for how to use it here: link: https://developers.google.com/gadgets/docs/fundamentals#SetPrefs

I hope it will help you.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top