Google Chrome extension - Webdb or IndexDB

橙三吉。 提交于 2019-12-23 03:12:36

问题


we are in process of developing google chrome extension, in which we need to store all the video information from a particular website. so we are considering the option of webdb. and now we are getting confused between to use webdb or indexdb..

As of now i think that, indexdb is still experimental, is that correct? and, if we use indexdb, the db even will not show up in dev. tools db section, where as webdb will show up, so that we can do query stuff in there..

please shed some light and put us in correct direction


回答1:


Use IndexedDB. WebSQL has been officially deprecated and will be removed from Chrome in the future. The dev channel of Chrome has experimental dev tools support for viewing IndexedDB databases.




回答2:


It's been a few months since I checked, but based on the work I did then, I would suggest WebSQL. The primary reason is that support is complete (it's basically SQLite). Here's what I wrote at the time:

If you're doing web app development and need to utilize a local (client-side) database, you should be using either localStorage (assuming you can live with the limitations of size and limited queries/indexing) or WebSQL. IndexedDB is not a contender yet, as essential functionality such as deleteDatabase is missing from for instance Chrome. WebSQL doesn't give you schemaless functionality without any glue, but on the other hand it works great (has a lot of uses outside of browsers as well), has full features functionality and probably limited or no practical size limitations.

In addition, the debug console (at that time) had WebSQL support, and no IndexedDB support. Things may have changed and YMMV, but at least you should be aware.



来源:https://stackoverflow.com/questions/9897699/google-chrome-extension-webdb-or-indexdb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!