|
|
OpenSocialBestPractices
Best practices when writing OpenSocial applications
Introduction
Try to follow these best practices when writing your applications.
Details
Reduce Latency
Check out the Latency Combat Field Manual for information on how to make your applications load faster.
Link HREFs
To use links to trigger JavaScript functions, you can use this format:
<a href="javascript:void(0);" onclick="javascript:callthis();">Click me to call this</a>
Do not use href="#"! When the user clicks on the link, the IFRAME hosting your gadget will clear its security token and subsequent opensocial calls will fail.
Sign in to add a comment

I'd like to see a section on caching. Between bpc=1, makeRequest and browser caching I never know if I've got the latest version!
<a href="javascript:void(0);" onclick="javascript:callthis();">Click me to call this</a>
What's wrong with <a onclick="callthis(); return false;">Click me to call this</a>
nothing wrong. seems people like to hide their javascript function names for whatever reasons
very helpful stuff. thanks ;-)