Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...