File, Save As for iPhone and Android
I have an application written in HTML5 that uses localstorage. The user should be able to play this game in airplane mode, but right now it goes to my website to load the page.
Q: How do I save a web page onto a mobile device so that it doesn't require going to the Internet to dl it first?
Is the answer 开发者_如何学Cdifferent for iPhone vs. Android?
You would use a mixture of DOMApplicationCache
and html5 web storage.
DOMApplicationCache
is for storing files, like images and JS
files. Info can be found here
web storage, in form of LocalStorage
and SessionStorage
, is for storing key/value pairs. That is pure data. There is also WebSQL
that is like SQLite
.
info on LocalStorage
and session storage here
Note that there are file-size limits, which vary on Android
and iOS
devices.
精彩评论