ContentProxy
Most browsers don’t allow XMLHttpRequest to retrieve data from domains other than the domain where the script was fetched from, as shown in the diagram below.
Because of this security restriction, Pageflakes provides a content proxy server that can be used to fetch data from other domains. To do this, the flake makes a request to the proxy server. The proxy server then retrieves the content and returns it to the browser, as shown below.
The Content Proxy provides several methods:
ContentProxy.GetUrl(url, F(this, callbackFunction))
ContentProxy.FormPost(url, values, F(this, callbackFunction))
ContentProxy.UploadString(url, "content as string which is POSTed", F(this, callbackFunction));
If the call is successful, the content proxy invokes a function that was passed to it as callback.
The ContentProxy is set to cache any retrieved data for 10 minutes (GET calls only). Successive calls with the same parameters use the cached data rather than re-fetching the data from the remote server. This action optimizes flake performance. However, if updated data is required before the 15 minute interval, the GetURL or FormPost methods cannot be used.
Non-cached results can be retrieved using ContentProxy.getUrlNonCached(). The parameters are the same as ContentProxy.GetUrl().

