Re: starting point: manifests, configs, and the such

-- 
Marcos Caceres


On Thursday, November 24, 2011 at 10:39 PM, Filip Maj wrote:

> 
> > 4. Apps being able to XHR to their own content has come up a lot (so
> > jQuery mobile and other libs can be used more easily). Also, a lot of
> > widget-like apps still use file://, which is bad because it breaks
> > anything depending on an origin (e.g., localStorage).
> > 
> > Just wondering, what are you guys using in PhoneGap as your local content
> > URI scheme on the various platforms?
> 
> 
> 
> Relative URLs. So if you have an app running off index.html in your widget
> root, you can XHR to "partials/template_one.html" and get the right local
> content.

Right, but those must "dereference" to something (i.e., in JS, what do you get back from "window.location.href" on each platform?). Is it file://? or content://? 
 
> Interesting side note on this, again, related to reality and not to what
> looks best spec-wise, that using the File API is *way* faster on a
> majority of platforms than making XHRs. I agree that XHR'ing is more of a
> "web" approach, though...

Yes, that makes sense. But, like, how do you read a text file from inside an app's package using File API without using <input type=file>?  

Received on Thursday, 24 November 2011 22:41:23 UTC