Re: [Caja] Error opening a url

35 views
Skip to first unread message

Kevin Reid

unread,
Jan 7, 2015, 10:48:53 AM1/7/15
to Google Caja Discuss
On Fri, Jan 2, 2015 at 3:58 PM, Vasilis Sikkis <sikkis...@gmail.com> wrote:
can anyone explain to me how to fixthis problem? 
WARNING(4) FAILED_TO_LOAD_EXTERNAL_URL: unknown:///unknown:0+0: failed to load external url
i have the js file in server of my university but i cant load it to the caja.load() function right. pls help me

Unfortunately, we don't have a provision for better explanations of failure to load.

The most likely cause is that you haven't specified a permissive network access policy. The policy is the second argument to caja.load(); try using caja.policy.net.ALL there.

If that doesn't help, please provide a short, complete, runnable code sample that demonstrates the problem so we can understand the problem better.

Kevin Reid

unread,
Feb 11, 2015, 1:21:52 PM2/11/15
to Google Caja Discuss
On Sat, Feb 7, 2015 at 7:52 AM, Vasilis Sikkis <sikkis...@gmail.com> wrote:
Im trying the tutorial examples on the caja website i put the tutorials in my server space but the caja.policy.net.ALL policy does not fix the problem.

Can you provide a link to your server so we can take a look at what's going on?

Kevin Reid

unread,
Mar 30, 2015, 3:26:46 PM3/30/15
to Google Caja Discuss
No, Caja doesn't have special requirements of the web server its files are on.

Oh, but maybe you have a cross-origin policy. If you're trying to load content using Caja from a third-party site (rather, one with a different domain name), then either you need to use a proxy (there's one supplied with Caja, but it's a bit of a mess), download the content via your own server first and provide it to Caja as a string, or have the other site allow access via CORS (Access-Control-Allow-Origin header).

If that's the problem, then there will be a message in your JavaScript console complaining about the lack of Access-Control-Allow-Origin.

If that's not the problem, we'll still need more information to go on. A complete copy of what's in the JavaScript console on the page that's trying to use Caja would be a good starting point.

On Sat, Mar 21, 2015 at 10:10 AM, Vasilis Sikkis <sikkis...@gmail.com> wrote:

Does the server needs to have any special requirements?  Can you provide me with an example with a code that is not provided in the caja server?

--

---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-caja-dis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages