Data Storage on Mobile App
问题 Am creating a recipes mobile app. I would like the recipes to sit on the app as opposed to downloading from the internet each time user wants to access. This means I would like the recipes in the app accessible even when app is offline. How best can I store this data (recipes) on the app? The app is HTML5, CSS3 and JavaScript. 回答1: You should use HTML5's localStorage for that. You can easily use this in this way: localStorage.setItem("data", "This data is stored"); And retrieve it: var data =