title: Phonegap caching Json data on local device
body: <p>since the last weeks i was diving into the mobile app developement. What i want to do is to use Phonegap in order to cache Json-Files to have a WebApp working even if there is no wifi or internet-connection.
  I'm very much puzzled. I've read many aproaches concerning offline-caching.
  But what i do not understand is, how to use for example cached Json-Files to render my web-app in offline mode.</p>
  
  <p><strong>I always thought it could work as follows:</strong></p>
  
  <p>Let's say i have a website, which is responisve. The content of this site is generated dynamically based upon Json-Data. </p>
  
  <p>Now i want to bring this website to a mobile device.
  I start with Phonegap. I write my first simple app  with a webview or a InAppBrowser, which holds my website. 
  Now i want to make this App being able to work even if offline based upon the cached Json-Data. 
  This is where i'm hanging in the air. I do not know any further. 
  Do i request the Json-Data and store this data into the local filesystem of my device with the PhoneGap File-Api? And how do use this data in order to build my layout.
  As far as did understand, i have PhoneGap as a container, which making the bridge between my response (HTML5, CCS, JS) WebSite and native functions.
  So what i do understand is, that i can load my website within a PhonGap container and it pretty much looks like an App. But when i'm offline i have to have data cached. Most important the Json-Data, on which the markup is based upon. How can i load this Json-Data from my local device and use this data to render?
  Today i was building a simple App, using PhoneGap with an InAppBrowser. Then i've found no tutorial how to cache the Json-Data, which was pulled by my responsive website. I could see this data has been used (via Fiddler as reverseproxy). So this data must be transferred to the InAppBrowser. I thought i mistunderstood something. maybe i have to include everything into the index.html (i'm using eclipse and phonegap and android).
  Can anyone tell on a simple example how i can call my website, cache the Json-Data (large Files, up to 100MB on the local device with PhoneGap File-Api) and use this Json-File to render my WebSite when offline? 
  Is this somehwo possible?</p>
  
  <hr>
  
  <p><strong>Update:</strong>
  I found this post on the internet, which can be adjusted, to fulfill my needs: <a href="http://www.raymondcamden.com/index.cfm/2012/1/19/Downloading-files-to-a-PhoneGap-application--Part-1" rel="nofollow">here</a>
  The code from this example, is this code from the index.html or is this code used within the website? Do i have to include the cordova.js into my website, too?</p>
  
  <p>Many thanks in advance.</p>