Hi David,

In Shindig, gadgets.io.getProxyUrl(url)
 returns a url through the content proxy.  By default this is 
http://<host>/gadgets/proxy.  For instance, gadgets.io.getProxyUrl("
http://shindig.apache.org";) will return this: 
http://<host>/gadgets/proxy?container=default&refresh=3600&url=http%3A%2F%2Fshindig.apache.org
 


Regarding caching, the content proxy is built to be highly cacheable and 
is designed (so far as I can tell) to cache resources like images.  You 
won't be able to use XHR to get the resource represented by the proxied 
url in a locked domain environment because the content proxy urls utilize 
the unlocked domain.

On a side note, the content proxy is also used when img tags and the like 
are rewritten in Shindig.  So if your gadget inserts an img, the src 
attribute is rewritten server side to go through the content proxy.

Regarding relative and absolute urls, this only supports absolute urls so 
far as I know.  The rewriter will handle relative urls in the case I 
mentioned above, however.

Do you have a particular use case you are trying to solve or are you just 
looking at getProxyUrl in general?

Best regards,
-Stanton



From:   David Robinson <drobin1...@gmail.com>
To:     dev@shindig.apache.org, 
Date:   03/21/2012 12:24
Subject:        gadgets.io.getProxyUrl usage ?



Can someone help me understand what the gadgets.io.getProxyUrl does ?

I've seen it discussed in the mailing lists, but the OpenSocial
specification only says:

        <static> Type: {String} gadgets.io.getProxyUrl(url, opt_params)

        Description: Gets the proxy version of the passed-in URL.


I  found a description elsewhere that implies that the getProxyUrl can be
used to cache objects

on the Shindig server and a local url is handed back instead of the
"remote" url - but

that is just a guess:

         "Gets the proxy version of the specified.
gadgets.io.getProxyUrlcan be used to cache the resources used in a
gadget and allow the gadget to
render faster."


Are there restrictions on relative vs. fully qualified URLs, whether the
gadget is local to shindig or served by another container ?

What sort of objects can be cached (assuming this caches....) using this
method ?

Thanks,

Reply via email to