Indexed Database API explained

IndexedDB
Long Name:Indexed Database API
Native Name:Indexed Database API
Native Name Lang:en
Status:First Public Working Draft
Version:3.0
Version Date:11 March 2021[1]
Preview:Editor's Draft
Preview Date:11 March 2021[2]
Committee:Web Applications Working Group
Abbreviation:IndexedDB
Domain:NoSQL databases

The Indexed Database API (commonly referred to as IndexedDB) is a JavaScript application programming interface (API) provided by web browsers for managing a NoSQL database of objects. It is a standard maintained by the World Wide Web Consortium (W3C).

As an alternative to the Web storage standard, IndexedDB can provide more storage capacity. Web storage has fixed limits per website, but IndexedDB limits are "usually quite large, if they exist at all".[3]

Use cases for IndexedDB include caching web application data for offline availability.[4] Some browser modules, such as devtools or extensions, may also use it for storage.

History

Support for IndexedDB was added to Firefox version 4,[5] Google Chrome version 11,[6] Internet Explorer version 10, Safari version 8,[7] and Microsoft Edge version 12.[8]

Web SQL Database was a prior API developed by Apple.[9] But Firefox refused to add support for it and argued against it becoming a standard because it would codify the quirks of SQLite.[10] [11] It was thus deprecated in favor of IndexedDB.[12]

IndexedDB 1.0 became a W3C Recommendation on January 8, 2015.[13] IndexedDB 2.0 became a W3C Recommendation on January 30, 2018.[14] [15] IndexedDB 3.0 is currently a First Public Working Draft.

Performance

Because IndexedDB is running inside of the security sandbox of a browser, all operations have to go through various security layers which decreases the performance of IndexedDB. With IndexedDB 2.0 [16] the getAll method was added which allows to improve performance on bulk read operations.

External links

Notes and References

  1. Web site: Indexed Database API 3.0. Ali. Alabbas. Joshua. Bell. Web Applications Working Group. Web Applications Working Group. W3C. W3C First Public Working Draft. 2021-03-11. 2021-05-15.
  2. Web site: Indexed Database API 3.0. Ali. Alabbas. Joshua. Bell. Web Applications Working Group. Web Applications Working Group. W3C. Editor’s Draft. 2021-03-11. 2021-05-15.
  3. Web site: Working with IndexedDB . Google . 19 January 2019.
  4. Web site: Using IndexedDB . MDN . Mozilla . 19 January 2019.
  5. Web site: IndexedDB - MDC Doc Center . Developer.mozilla.org . 2011-02-18 . 2012-05-26 . https://web.archive.org/web/20120526230025/https://developer.mozilla.org/en/IndexedDB . dead .
  6. Web site: IndexedDB - Chrome Platform Status. IndexedDB - Chrome Platform Status. The Chromium Projects . 2012-05-21 . 2021-05-15.
  7. Web site: OS X Yosemite v10.10 § App Features. Apple. Apple Developers. 2017-07-09. 2021-05-15.
  8. Web site: IndexedDB. Can I use.... n.d.. 2021-05-16.
  9. Web site: Shankland. Stephen. Consensus emerges for key Web app standard | Deep Tech - CNET News . News.cnet.com . 2010-03-12 . 2011-02-18.
  10. Web site: Well, I'm Back: Not Implementing Features Is Hard. https://web.archive.org/web/20201109032423/http://robert.ocallahan.org/2010/06/not-implementing-features-is-hard_03.html. Robert. O'Callahan. Weblogs.mozillazine.org. 2010-06-04. 2011-02-18. 2020-11-09.
  11. Web site: Beyond HTML5: Database APIs and the Road to IndexedDB – Mozilla Hacks - the Web developer blog. Mozilla Hacks – the Web developer blog. Arun. Ranganathan. 2010-06-01. 2021-05-21.
  12. Web site: html5 - Why is Web SQL database deprecated?. Software Engineering Stack Exchange.
  13. Web site: Indexed Database API. 2015-01-08. 2021-05-16. Web Applications Working Group. Web Applications Working Group. W3C. W3C Recommendation. Nikunj. Mehta. Jonas. Sicking. Eliot. Graff. Andrei. Popescu. Jeremy. Orlow. Joshua. Bell.
  14. Web site: Indexed Database API 2.0 is now a W3C Recommendation W3C News. W3C News. W3C. 2018-01-30. 2021-05-16.
  15. Web site: Indexed Database API 2.0. 2018-01-30. 2021-05-16. Web Applications Working Group. Web Applications Working Group. W3C. W3C Recommendation. Ali. Alabbas. Joshua. Bell.
  16. Web site: Indexed Database API 2.0 is now a W3C Recommendation W3C News. W3C News. W3C. 2018-01-30. 2021-05-16.