How to retrieve external data while offline in mobile safari
I'm building several apps using the HTML5 standard with the intention of running them offline in Mobile Safari. Most of these apps provide a graphical representation of data collected in several massive plain text files that are going to be packaged alongside the core app files. I need a way to retrieve the data in these files and represent them as a String or some other readable object in Javascript.
From my limited amount of research it would appear that cross-origin restrictions prevent me from doing this, even though all files are working from a local directory. Is there something I'm missing or is there no way for me to accomplish what I'm after?
Answers
I'd use JSON. You can grab data cross-domain using JSON-P if needed. JSON is also local-storage friendly.