简体   繁体   中英

What is the difference between database storage API and DOM storage API

From the WebView documentation, it says:

  1. setDatabaseEnabled sets whether the database storage API is enabled.
  2. setDomStorageEnabled sets whether the DOM storage API is enabled.

So I want to ask what is database storage API and what is DOM storage API ? What are their differences?

setDatabaseEnabled refers to the Web SQL Database API which allows webpages to store data in a relational database. However, this API is actually deprecated. See https://en.wikipedia.org/wiki/Web_SQL_Database

setDomStorageEnabled refers to the HTML5 Web Storage API, which allows web pages to store key-value pairs of data, similar to cookies, but with larger storage capacity. See https://en.wikipedia.org/wiki/Web_storage

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM