Curljs + PhoneGap lazy loading

22 views
Skip to first unread message

Greg

unread,
Sep 12, 2014, 1:09:46 PM9/12/14
to cuj...@googlegroups.com
I'm trying to lazily load external js resources in a PhoneGap app via curljs.

It works just fine in a browser, however when deployed to Android (via PhoneGap Build), my curl invocation (curl['//domain/path/], successBack, errorBack )) invokes the error handler with the message 'Error: Syntax or http error' on the resource.

The resources themselves are deliberately not bundled with the app, I want them to be delivered at runtime for various reasons, and I can see from my server logs that my device is issuing the appropriate http request at runtime, so I don't think it's a security config issue.

I've tried various combinations of url to access my resource, including 'http://domain/path', '//domain/path', 'domain/path', etc however all produce the same error.  

Has anyone tried this? Any suggestions? 

Thx,

John Hann

unread,
Sep 12, 2014, 3:21:47 PM9/12/14
to cuj...@googlegroups.com
Hey Greg,

I've not use PhoneGap, but have used Intel XDK. I would expect this to just work. Have you checked that the correct content types are set on the http headers (response and request)?

-- John
--
You received this message because you are subscribed to the Google Groups "cujojs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cujojs+un...@googlegroups.com.
To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.
To view this discussion on the web visit https://groups.google.com/d/msgid/cujojs/55618b46-7538-4373-970e-78f55e6bb4a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages