Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

html - Offline access - SQLite or Indexed DB?

I am in the R&D phase of developing an application, with the following key requirements:

  • HTML5 web application - which will also have a hybrid version
  • Forms data will be stored locally, when no Internet connection

I cannot use web storage due to quota limitations - I am comparing SQLite and Indexed DB.

  • SQLite seems to be best fit, but it is deprecated
  • Indexed DB is a good alternative, but there's no Safari support - A hybrid application is supposed to be run on the iPad and on an Android device in the future.

I am confused in the selection of API. Is there some other alternative to SQLite or support of Indexed DB expected on Safari?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think abandoning IndexedDB would be a bad idea, because it's probably the format of the future, so Safari might stop supporting WebSQL.

It appears there are various JavaScript solutions to bridge the gap between the two - saving in whichever is available on the user's browser: JavaScript Library to Bridge IndexedDB and WebSQL I think this is probably your best solution.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...